Struct splits_io_api::Game
source · pub struct Game {
pub categories: Option<Vec<Category>>,
pub created_at: Box<str>,
pub id: Box<str>,
pub name: Box<str>,
pub shortname: Option<Box<str>>,
pub updated_at: Box<str>,
}
Expand description
A Game is a collection of information about a game, and a container for Categories.
Fields§
§categories: Option<Vec<Category>>
The known speedrun categories for this game.
created_at: Box<str>
The time and date at which this game was created on splits.io. This field conforms to ISO 8601.
id: Box<str>
The unique ID of the game.
name: Box<str>
The full title of the game, like “Super Mario Sunshine”.
shortname: Option<Box<str>>
A shortened title of the game, like “sms”, if it is known. Where possible, this name tries to match with those on SpeedRunsLive and/or Speedrun.com.
updated_at: Box<str>
The time and date at which this game was most recently modified on splits.io. This field conforms to ISO 8601.
Implementations§
source§impl Game
impl Game
sourcepub async fn search(client: &Client, name: &str) -> Result<Vec<Game>, Error>
pub async fn search(client: &Client, name: &str) -> Result<Vec<Game>, Error>
Searches for a Game based on the name of the game.
sourcepub async fn get(client: &Client, shortname: &str) -> Result<Game, Error>
pub async fn get(client: &Client, shortname: &str) -> Result<Game, Error>
Gets a Game based on the shortened title of the game.
sourcepub async fn categories(&self, client: &Client) -> Result<Vec<Category>, Error>
pub async fn categories(&self, client: &Client) -> Result<Vec<Category>, Error>
Gets the Categories that belong to the Game based on the shortened title of the game.