Merge pull request #46 from android-police/feature/add-description-recentchanges-fields

Exposed descriptionHtml, recentChangesHtml, versionString and saleEnds in utils.py
This commit is contained in:
Domenico Iezzi 2018-03-13 22:00:44 +01:00 committed by GitHub
commit 425a3f8334
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 287 additions and 275 deletions

View File

@ -232,6 +232,7 @@ message Offer {
optional SubscriptionTerms subscriptionTerms = 12;
optional string formattedName = 13;
optional string formattedDescription = 14;
optional string saleEnds = 31;
}
message OwnershipInfo {
optional int64 initiationTimestampMsec = 1;

File diff suppressed because one or more lines are too long

View File

@ -8,11 +8,14 @@ def fromDocToDictionary(app):
return {"docId": app.docid,
"title": app.title,
"author": app.creator,
"description": app.descriptionHtml,
"recentChanges": app.details.appDetails.recentChangesHtml,
"offer": [{"micros": o.micros,
"currencyCode": o.currencyCode,
"formattedAmount": o.formattedAmount,
"checkoutFlowRequired": o.checkoutFlowRequired,
"offerType": o.offerType}
"offerType": o.offerType,
"saleEnds": o.saleEnds}
for o in app.offer],
"images": [{"imageType": img.imageType,
"width": img.dimension.width
@ -25,6 +28,7 @@ def fromDocToDictionary(app):
"supportsFifeUrlOptions": img.supportsFifeUrlOptions}
for img in app.image],
"versionCode": app.details.appDetails.versionCode,
"versionString": app.details.appDetails.versionString,
"installationSize": app.details.appDetails.installationSize,
"numDownloads": app.details.appDetails.numDownloads,
"uploadDate": app.details.appDetails.uploadDate,
@ -98,4 +102,4 @@ def hasDoc(obj):
except TypeError:
existance = False
return existance
return existance