23 releases (9 stable)

5.3.0 Aug 8, 2024
5.2.0 Jul 26, 2024
5.1.0 Apr 3, 2024
5.0.0 Mar 29, 2024
0.2.1 Jul 1, 2021

#269 in Web programming

Download history 42/week @ 2024-07-07 19/week @ 2024-07-14 162/week @ 2024-07-21 167/week @ 2024-07-28 111/week @ 2024-08-04 77/week @ 2024-08-11 46/week @ 2024-08-18 63/week @ 2024-08-25 49/week @ 2024-09-01 72/week @ 2024-09-08 97/week @ 2024-09-15 135/week @ 2024-09-22 64/week @ 2024-09-29 118/week @ 2024-10-06 105/week @ 2024-10-13 96/week @ 2024-10-20

388 downloads per month
Used in 3 crates

MIT license

290KB
5K SLoC

gpapi - Google Play API for Rust

crates.io Documentation MIT licensed CI

A library for interacting with the Google Play API.

Getting Started

To interact with the API, first you'll have to obtain an OAuth token by visiting the Google embedded setup page and opening the browser debugging console, logging in, and looking for the oauth_token cookie being set on your browser. It will be present in the last requests being made and start with "oauth2_4/". Copy this value. It can only be used once, in order to obtain the aas_token, which can be used subsequently. To obtain this token:

use gpapi::Gpapi;

#[tokio::main]
async fn main() {
    let mut api = Gpapi::new("ad_g3_pro", &email);
    println!("{:?}", api.request_aas_token(oauth_token).await);
}

Now, you can begin interacting with the API by initializing it setting the aas_token and logging in.

use gpapi::Gpapi;

#[tokio::main]
async fn main() {
    let mut api = Gpapi::new("px_7a", &email);
    api.set_aas_token(aas_token);
    api.login().await;
    // do something
}

From here, you can get package details, get the info to download a package, or use the library to download it.

let details = api.details("com.instagram.android").await;
println!("{:?}", details);

let download_info = api.get_download_info("com.instagram.android", None).await;
println!("{:?}", download_info);

api.download("com.instagram.android", None, true, true, &Path::new("/tmp/testing"), None).await;

Docs

Documentation for this crate can be found on docs.rs.

Todo

This inludes some subset, but not all, of the Google Play API library. Some of the functionality is missing, such as browsing and searching for packages.

Credits

This library was originally created by David Weinstein, and is currently maintained by Bill Budington.

It follows some of the conventions set by Aurora's gplayapi java library. It was originally modeled after the googleplay-api for python patterns.

License: MIT

Dependencies

~7–18MB
~265K SLoC