Types

Image

pub struct Image {
    pub url: String,
    pub snowflake: String,
    pub nsfw: bool,
    pub tag: String
}

RedditImage

pub struct RedditImage {
    pub title: String,
    pub image_url: String,
    pub source: String,
    pub subreddit: String,
    pub upvotes: u64,
    pub downvotes: u64,
    pub comments: u64,
    pub created_at: f64,
    pub nsfw: bool,
    pub author: String,
    pub awards: u64
}

WikiHowImage

pub struct WikiHowImage {
    pub url: String,
    pub title: String,
    pub nsfw: bool,
    pub article_url: String
}

TagList

pub struct TagList {
    pub models: Option<Vec<TagModel>>,
    pub tags: Vec<String>,
    pub nsfw_tags: Option<Vec<String>>
}

TagModel

pub struct TagModel {
    pub name: String,
    pub nsfw: bool,
}

SpanType

pub enum SpanType {  //Select the time range you want your image to be selected
    Hour,
    Day,
    Week,
    Month,
    Year,
    All
}

ImageError

pub struct ImageError {
    pub code: u16,
    pub error: bool,
    pub message: String,
    pub cache: Option<bool>
}

Last updated