gpipipi
a rust crate for the google play api
usage
you get an oauth token by logging in into the embedded setup page, opening the dev tools and then checking the network tab / application tab for the returned cookie. the token can only be used once, and the resulting aas token doesn't seem to expire
after getting the oauth token, you can convert it with the crate by running it as a binary like so:
OAUTH_TOKEN="..." EMAIL="..."
alternatively you can convert it manually using OAuthRequest
after getting the aas token, you can now log in and start doing requests using LongLivedClient
if you already have an auth token that was generated from an aas token somewhere else, use ShortLivedClient instead, auth tokens expire way faster than aas tokens do and that client has no aas token to renew them with, so it takes a fresh one whenever you have it
the requests themselves live on the Client trait, which both of them implement, so it needs to be in scope
tests
the doc examples log into google for realsies, so they need tokens of their own, and they take a different one than the binary does AAS_TOKEN is what comes out of it
EMAIL="..." AAS_TOKEN="..."
since every example logs in on its own, google likes to throttle them when they all run at once, --test-threads=1 sorts that out