feedly_api/models/
token_response.rs

1use super::super::AccessToken;
2use super::super::RefreshToken;
3use serde_derive::{Deserialize, Serialize};
4
5#[derive(Debug, Serialize, Deserialize)]
6pub struct AccessTokenResponse {
7    /// The feedly user id
8    pub id: String,
9
10    /// A token that may be used to obtain a new access token.
11    /// Refresh tokens are valid until the user revokes access.
12    pub refresh_token: RefreshToken,
13
14    /// A token that may be used to access APIs.
15    /// Access tokens have an expiration (see `expires_in`).
16    pub access_token: AccessToken,
17
18    /// The remaining lifetime of the `access_token` in seconds.
19    pub expires_in: u32,
20
21    /// Indicates the type of token returned.
22    /// At this time, this field will always have the value of `Bearer`
23    pub token_type: String,
24
25    /// Indicates the user plan (`standard`, `pro` or `business`).
26    pub plan: String,
27
28    pub provider: String,
29
30    /// (optional) The state that was passed in. In this case `feedly-api rust crate`.
31    #[serde(default)]
32    pub state: Option<String>,
33}
34
35#[derive(Debug, Serialize, Deserialize)]
36pub struct RefreshTokenResponse {
37    /// The feedly user id.
38    pub id: String,
39
40    /// The new access token.
41    pub access_token: AccessToken,
42
43    /// The remaining lifetime of the access token in seconds.
44    pub expires_in: u32,
45
46    /// Indicates the type of token returned.
47    /// At this time, this field will always have the value of `Bearer`
48    pub token_type: String,
49
50    /// Indicates the user plan (`standard`, `pro` or `business`).
51    pub plan: String,
52
53    pub provider: String,
54
55    /// `https://cloud.feedly.com/subscriptions`
56    pub scope: String,
57}