[][src]Struct splits_io_api::Game

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>,
}

A Game is a collection of information about a game, and a container for Categories.

API Documentation

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

impl Game[src]

pub async fn search(client: &Client, name: &str) -> Result<Vec<Game>, Error>[src]

Searches for a Game based on the name of the game.

pub async fn get(client: &Client, shortname: &str) -> Result<Game, Error>[src]

Gets a Game based on the shortened title of the game.

pub async fn categories(&self, client: &Client) -> Result<Vec<Category>, Error>[src]

Gets the Categories that belong to the Game based on the shortened title of the game.

pub async fn runs(&self, client: &Client) -> Result<Vec<Run>, Error>[src]

Gets the Runs that belong to the Game based on the shortened title of the game.

pub async fn runners(&self, client: &Client) -> Result<Vec<Runner>, Error>[src]

Gets the Runners that belong to the Game based on the shortened title of the game.

Trait Implementations

impl Debug for Game[src]

impl<'de> Deserialize<'de> for Game[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.