feat(apple): correct api response

This commit is contained in:
2025-11-10 11:32:00 +07:00
parent f67b175f27
commit de46765d0c
2 changed files with 28 additions and 63 deletions
@@ -83,15 +83,6 @@ public class AppStoreScraper {
return response.score();
}
public static String getAppScoreText(String appId, String country) {
var response = getAppResponse(appId, country);
if (response == null) {
log.error("response is null");
return "";
}
return response.scoreText();
}
public static long getAppReviews(String appId, String country) {
var response = getAppResponse(appId, country);
if (response == null) {
@@ -4,64 +4,38 @@ import java.util.List;
import java.util.Map;
public record AppleAppResponse(
long id,
String appId,
String title,
String url,
String description,
String descriptionHTML,
String summary,
String installs,
long minInstalls,
long maxInstalls,
double score,
String scoreText,
long ratings,
long reviews,
Map<String, Long> histogram,
double price,
boolean free,
String currency,
String priceText,
boolean offersIAP,
String IAPRange,
String androidVersion,
String androidVersionText,
String androidMaxVersion,
String developer,
String developerId,
String developerEmail,
String developerWebsite,
String developerAddress,
String developerLegalName,
String developerLegalEmail,
String developerLegalAddress,
String developerLegalPhoneNumber,
String privacyPolicy,
String developerInternalID,
String genre,
String genreId,
List<Category> categories,
String icon,
String headerImage,
List<String> screenshots,
String video,
String videoImage,
String previewVideo,
List<String> genres,
List<String> genreIds,
String primaryGenre,
int primaryGenreId,
String contentRating,
String contentRatingDescription,
boolean adSupported,
List<String> languages,
String size,
String requiredOsVersion,
String released,
String updated,
String releaseNotes,
String version,
String recentChanges,
List<String> comments,
boolean preregister,
boolean earlyAccessEnabled,
boolean isAvailableInPlayPass,
boolean editorsChoice,
List<Feature> features,
String appId,
String url) {
public record Category(String name, String id) {}
public record Feature(String title, String description) {}
}
double price,
String currency,
boolean free,
long developerId,
String developer,
String developerUrl,
String developerWebsite,
double score,
int reviews,
double currentVersionScore,
int currentVersionReviews,
List<String> screenshots,
List<String> ipadScreenshots,
List<String> appletvScreenshots,
List<String> supportedDevices,
long ratings,
Map<String, Long> histogram) {}