Struct gpapi::Gpapi [−][src]
pub struct Gpapi { /* fields omitted */ }
Expand description
The Gpapi object is the sole way to interact with the Play Store API. It abstracts the logic of low-level communication with Google’s Play Store servers.
Implementations
Returns a Gpapi struct with locale, timezone, and the device codename specified.
Arguments
locale
- A string type specifying the device locale, e.g. “en_US”timezone
- A string type specifying the timezone , e.g. “UTC”device_codename
- A string type specifying the device codename, e.g. “hero2lte”
Log in to Google’s Play Store API. This is required for most other actions.
Arguments
username
- A string type specifying the login username, usually a full emailpassword
- A string type specifying an app password, created from your Google account settings.
Download a package, given a package ID, optional version code, and filesystem path.
Arguments
pkg_name
- A string type specifying the package’s app ID, e.g.com.instagram.android
version_code
- An optinal version code, given in i32. If omitted, the latest version will be useddst_path
- A path to download the file to.
Errors
If the file already exists for this download, an Err(Error
) result is returned with an
[ErrorKind
] of FileExists.
If the specified directory is misssing, an Err(Error
) result is returned with an
[ErrorKind
] of DirectoryMissing.
pub async fn get_download_url<S: Into<String>>(
&self,
pkg_name: S,
version_code: Option<i32>
) -> Result<Option<String>, GpapiError>
pub async fn get_download_url<S: Into<String>>(
&self,
pkg_name: S,
version_code: Option<i32>
) -> Result<Option<String>, GpapiError>
Retrieve the download URL for a package, given a package ID and optional version code.
Arguments
pkg_name
- A string type specifying the package’s app ID, e.g.com.instagram.android
version_code
- An optinal version code, given in i32. If omitted, the latest version will be used
pub async fn details<S: Into<String>>(
&self,
pkg_name: S
) -> Result<Option<DetailsResponse>, GpapiError>
pub async fn details<S: Into<String>>(
&self,
pkg_name: S
) -> Result<Option<DetailsResponse>, GpapiError>
Play Store package detail request (provides more detail than bulk requests).
Arguments
pkg_name
- A string type specifying the package’s app ID, e.g.com.instagram.android
pub async fn bulk_details(
&self,
pkg_names: &[&str]
) -> Result<Option<BulkDetailsResponse>, GpapiError>
pub async fn bulk_details(
&self,
pkg_names: &[&str]
) -> Result<Option<BulkDetailsResponse>, GpapiError>
Play Store bulk detail request for multiple apps.
Arguments
pkg_names
- An array of string types specifying package app IDs
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Gpapi
impl !UnwindSafe for Gpapi
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more