pub struct ApiToken {
pub created_at: Option<DateTime<Utc>>,
pub expires_at: Option<DateTime<Utc>>,
pub from_browser: Option<bool>,
pub id: Option<String>,
pub last_used_at: Option<DateTime<Utc>>,
pub name: Option<String>,
pub object: Option<String>,
pub token: Option<String>,
pub updated_at: Option<DateTime<Utc>>,
pub user_id: Option<String>,
}
Expand description
An ApiToken is a unique identifier that you can use to authenticate requests to the API. You can create as many ApiTokens as you need.
JSON schema
{
"description": "An ApiToken is a unique identifier that you can use to authenticate requests to the API. You can create as many ApiTokens as you need.",
"type": "object",
"properties": {
"created_at": {
"description": "Time at which the object was created.",
"readOnly": true,
"type": "string",
"format": "date-time"
},
"expires_at": {
"description": "The time this ApiToken expires.",
"type": "string",
"format": "date-time"
},
"from_browser": {
"description": "Whether this ApiToken was created from the browser.",
"readOnly": true,
"type": "boolean"
},
"id": {
"description": "This is the internal ID for this ApiToken. You don’t need to record this information, since you will not need to use it.",
"readOnly": true,
"type": "string"
},
"last_used_at": {
"description": "The last time this ApiToken was used.",
"readOnly": true,
"type": "string",
"format": "date-time"
},
"name": {
"description": "The name of the ApiToken.",
"type": "string"
},
"object": {
"description": "String representing the object’s type. Objects of the same type share the same value.",
"readOnly": true,
"examples": [
"api_token"
],
"type": "string"
},
"token": {
"description": "The actual token that you will use to authenticate your requests. > **Be careful, this token is only returned once, when the token is created.**",
"readOnly": true,
"type": "string"
},
"updated_at": {
"description": "Time at which the object was last updated.",
"readOnly": true,
"type": "string",
"format": "date-time"
},
"user_id": {
"description": "The ID of the user that created this ApiToken.",
"readOnly": true,
"type": "string"
}
}
}
Fields§
§created_at: Option<DateTime<Utc>>
Time at which the object was created.
expires_at: Option<DateTime<Utc>>
The time this ApiToken expires.
from_browser: Option<bool>
Whether this ApiToken was created from the browser.
id: Option<String>
This is the internal ID for this ApiToken. You don’t need to record this information, since you will not need to use it.
last_used_at: Option<DateTime<Utc>>
The last time this ApiToken was used.
name: Option<String>
The name of the ApiToken.
object: Option<String>
String representing the object’s type. Objects of the same type share the same value.
token: Option<String>
The actual token that you will use to authenticate your requests. > Be careful, this token is only returned once, when the token is created.
updated_at: Option<DateTime<Utc>>
Time at which the object was last updated.
user_id: Option<String>
The ID of the user that created this ApiToken.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ApiToken
impl<'de> Deserialize<'de> for ApiToken
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ApiToken
impl JsonSchema for ApiToken
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moreAuto Trait Implementations§
impl Freeze for ApiToken
impl RefUnwindSafe for ApiToken
impl Send for ApiToken
impl Sync for ApiToken
impl Unpin for ApiToken
impl UnwindSafe for ApiToken
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more