mirror of
https://github.com/FliegendeWurst/googleplay-api.git
synced 2024-11-22 12:54:58 +00:00
Initial userProfile implementation
This commit is contained in:
parent
e9e866da97
commit
1e567277f5
@ -926,6 +926,18 @@ message SearchResponse {
|
|||||||
repeated RelatedSearch relatedSearch = 6;
|
repeated RelatedSearch relatedSearch = 6;
|
||||||
optional string nextPageUrl = 10;
|
optional string nextPageUrl = 10;
|
||||||
}
|
}
|
||||||
|
message UserProfileResponseWrapper {
|
||||||
|
optional UserProfilePayload payload = 1;
|
||||||
|
optional ServerCommands commands = 2;
|
||||||
|
repeated PreFetch preFetch = 3;
|
||||||
|
repeated Notification notification = 4;
|
||||||
|
}
|
||||||
|
message UserProfilePayload {
|
||||||
|
optional UserProfileResponse response = 5;
|
||||||
|
}
|
||||||
|
message UserProfileResponse {
|
||||||
|
repeated DocV2 doc = 1;
|
||||||
|
}
|
||||||
message SearchSuggestResponse {
|
message SearchSuggestResponse {
|
||||||
repeated SearchSuggestEntry entry = 1;
|
repeated SearchSuggestEntry entry = 1;
|
||||||
}
|
}
|
||||||
|
@ -328,6 +328,22 @@ class GooglePlayAPI(object):
|
|||||||
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
|
def userProfile(self):
|
||||||
|
path = 'api/userProfile'
|
||||||
|
headers = self.getDefaultHeaders()
|
||||||
|
|
||||||
|
url = self.FDFE + path
|
||||||
|
response = requests.get(url, headers=headers,
|
||||||
|
verify=ssl_verify,
|
||||||
|
timeout=60)
|
||||||
|
|
||||||
|
message = googleplay_pb2.UserProfileResponseWrapper.FromString(response.content)
|
||||||
|
if message.commands.displayErrorMessage != "":
|
||||||
|
raise RequestError(message.commands.displayErrorMessage)
|
||||||
|
|
||||||
|
result = utils.fromDocToDictionary(message.payload.response.doc[0])
|
||||||
|
return result
|
||||||
|
|
||||||
def details(self, packageName):
|
def details(self, packageName):
|
||||||
"""Get app details from a package name.
|
"""Get app details from a package name.
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user