Gpapi

Struct Gpapi 

Source
pub struct Gpapi { /* private fields */ }

Implementations§

Source§

impl Gpapi

Source

pub fn new<S: Into<String>>(device: Device, email: S) -> Self

Returns a Gpapi struct.

Source

pub fn set_locale<S: Into<String>>(&mut self, locale: S)

Set the locale

Source

pub fn set_timezone<S: Into<String>>(&mut self, timezone: S)

Set the time zone

Source

pub fn set_aas_token<S: Into<String>>(&mut self, aas_token: S)

Set the aas token. This can be requested via request_aas_token, and is required for most other actions.

Source

pub async fn request_aas_token<S: Into<String>>( &mut self, oauth_token: S, ) -> Result<(), GpapiError>

Request and set the aas token given an oauth token and the associated email.

§Arguments
  • oauth_token - An oauth token you previously retrieved separately
Source

pub fn get_aas_token(&self) -> Option<&str>

Get the aas token that has been previously set by either request_aas_token or set_aas_token.

Source

pub async fn login(&mut self) -> Result<(), GpapiError>

Log in to Google’s Play Store API. This is required for most other actions. The aas token has to be set via request_aas_token or set_aas_token first.

Source

pub async fn get_download_info<S>( &self, package: S, version_code: Option<i32>, ) -> Result<DownloadInfo, GpapiError>
where S: Into<String>,

Retrieve files with download URLs for a package.

§Arguments
  • package - Package ID, such as moe.low.arc.
  • version_code - Optional version code, if None, the latest version will be used.
§Returns

If successful, Ok with the files to download for the package.

Source

pub async fn details<S: Into<String>>( &self, pkg_name: S, ) -> Result<Option<DetailsResponse>, Box<dyn Error>>

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
Source

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
Source

pub async fn accept_tos( &mut self, ) -> Result<Option<AcceptTosResponse>, Box<dyn Error>>

Accept the play store terms of service.

Trait Implementations§

Source§

impl Debug for Gpapi

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Gpapi

§

impl !RefUnwindSafe for Gpapi

§

impl Send for Gpapi

§

impl Sync for Gpapi

§

impl Unpin for Gpapi

§

impl !UnwindSafe for Gpapi

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more