gpipipi 0.2.1

a rust crate for the google play api
Documentation
use crate::proto::{Item, Review};

/// a url for a specific file, with a filename and a sha1 hash
#[derive(Debug)]
pub struct CdnUrl {
    pub filename: String,
    pub sha1: String,
    pub url: String,
}

/// response for an app, contains the base apk and any additional splits and obbs
#[derive(Debug)]
pub struct DownloadResponse {
    pub splits: Vec<CdnUrl>,
    pub obbs: Vec<CdnUrl>,
    pub base: CdnUrl,
}

/// a category type for apps
#[derive(Debug, Clone, Copy)]
pub enum CategoryType {
    Application,
    Game,
    Family,
}

/// a category
#[derive(Debug)]
pub struct Category {
    pub cat_type: CategoryType,
    pub images: Vec<String>,
    pub browse_url: String,
    pub title: String,
}

/// search results for a query, optionally containing an identifier for the next page
#[derive(Debug)]
pub struct SearchResults {
    pub next_page: Option<NextSearchPage>,
    pub items: Vec<Item>,
}

/// unique identifier for a next search page
#[derive(Debug)]
pub struct NextSearchPage(pub(crate) String);

/// filter for reviews
#[derive(Debug)]
pub enum ReviewsFilter {
    All,
    Newest,
    Positive,
    Critical,
}

/// review results for an app, optionally containing an identifier for the next page
#[derive(Debug)]
pub struct ReviewsResults {
    pub next_page: Option<NextReviewsPage>,
    pub reviews: Vec<Review>,
}

/// unique identifier for a next reviews page
#[derive(Debug)]
pub struct NextReviewsPage(pub(crate) String);