- Remove unstable userProfile API
- Changed names for some variables
- Disabled print calls. Loggin is now entirely up to the user.
- Implemented device config token, retrieved after the `uploadDevice`
procedure
- Updated headers from play-store-api project
- Fixed initialization for obb_download_test.py
* Updated user agent string with data taken from play-store-api
* *download* and *delivery* functions will now return a python generator
rather than raw bytes, to prevent app loading entire files in memory.
This generator can be iterated to get chunk of bytes to write, as
discussed in issue #35.
* as a consequence of the previous point, there is no more progress bar
feature for downloading. It should be implemented by developers using
the API.
Before, if locale wasn't specified as a parameter, it was picked from
the system running gpapi. Similar thing happened for timezone, but its
value was hardcoded in config.py.
To avoid problems related to missing or unavailable apps, this commit
enforces users to provide a locale and a timezone value. Without them,
gpapi can't be initialized.
Since most of the device data is used only for the checkin procedure,
which is run only after the first login with email and passwd, it
is useless to have functions in GooglePlayAPI to modify them at runtime.
Now if the user wants to specify custom data, this data should be
provided as arguments to the constructor.
As described in play-store-api code [1] recenlty google introduced a Time
To Live to each auth token, which caused them to expire in a matter of
seconds. Moreover, in order to retrieve a long-ttl token, a second auth
request now is needed, sending the Master Token returned from the first
request. This 'second round' request will return the actual authSubToken.
Another addition is that the code now return response's text for some
generic errors, in order to help debugging those problems.
Now the function returns None if an app doesnt't exists. This does not
apply for details() function, which instead return a RequestError if the
app doesn't exist.
In order to catch invalid tokens, an additional integrity check is done
before returning lists in details() and bulkDetails() functions. If the
check doesn't pass, raise a LoginError.