rsreddit 0.1.3

Lightweight Reddit API wrapper
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct OAuthToken {
    pub access_token: String,
    pub token_type: String,
    pub expires_in: usize,
    pub scope: String,
    #[serde(default = "empty_string")]
    pub refresh_token: String,
}

fn empty_string() -> String {
    "".to_string()
}