mirror of
https://github.com/FliegendeWurst/googleplay-api.git
synced 2024-11-22 12:54:58 +00:00
details() now return a dict, rather than pb object
Signed-off-by: Domenico Iezzi <domenico.iezzi.201@gmail.com>
This commit is contained in:
parent
dda3a2f39f
commit
052afcbb0b
@ -305,10 +305,12 @@ class GooglePlayAPI(object):
|
||||
|
||||
def details(self, packageName):
|
||||
"""Get app details from a package name.
|
||||
|
||||
packageName is the app unique ID (usually starting with 'com.')."""
|
||||
path = "details?doc=%s" % requests.utils.quote(packageName)
|
||||
message = self.executeRequestApi2(path)
|
||||
return message.payload.detailsResponse
|
||||
data = self.executeRequestApi2(path)
|
||||
app = utils.fromDocToDictionary(data.payload.detailsResponse.docV2)
|
||||
return app
|
||||
|
||||
def bulkDetails(self, packageNames):
|
||||
"""Get several apps details from a list of package names.
|
||||
|
8
test.py
8
test.py
@ -26,7 +26,6 @@ apps = server.search('termux', 34, None)
|
||||
print('nb_result: 34')
|
||||
print('number of results: %d' % len(apps))
|
||||
|
||||
|
||||
print('\nFound those apps:\n')
|
||||
for a in apps:
|
||||
print(a['docId'])
|
||||
@ -68,10 +67,15 @@ if not errorThrown:
|
||||
|
||||
# BULK DETAILS
|
||||
|
||||
print('\nGetting details for %s\n' % testApps[0])
|
||||
print('\nGetting bulkDetails for %s\n' % testApps[0])
|
||||
bulk = server.bulkDetails(testApps)
|
||||
print(bulk)
|
||||
|
||||
# DETAILS
|
||||
print('\nGetting details for %s\n' % testApps[0])
|
||||
details = server.details(testApps[0])
|
||||
print(details)
|
||||
|
||||
# BROWSE
|
||||
|
||||
print('\nBrowse play store categories\n')
|
||||
|
Loading…
Reference in New Issue
Block a user