pub struct Account {Show 15 fields
pub id: String,
pub age: u64,
pub name: String,
pub world: u64,
pub guilds: Vec<String>,
pub guild_leader: Option<Vec<String>>,
pub created: DateTime<Utc>,
pub access: AccountAccess,
pub commander: bool,
pub fractal_level: Option<u8>,
pub daily_ap: Option<u16>,
pub monthly_ap: Option<u16>,
pub wvw_rank: Option<u16>,
pub last_modified: DateTime<Utc>,
pub build_storage_slots: Option<u64>,
}
Expand description
Basic information about an account.
Fields§
§id: String
A globally unique GUID for the account.
age: u64
The age of the account in seconds.
name: String
The unique display name of the account. Note that it is possible for the name to change.
world: u64
The home world of the account.
guilds: Vec<String>
A list of guilds the account has joined.
guild_leader: Option<Vec<String>>
A list of guilds the account has leader access to.
Requires the guilds
scope. This is None
if the scope is missing.
created: DateTime<Utc>
The account creation date.
access: AccountAccess
A list of content the account has access to.
commander: bool
Whether the account has unlocked the commander tag.
fractal_level: Option<u8>
The fractal level of the account.
Requires the progression
scope. This is None
if the scope is missing.
daily_ap: Option<u16>
The number of daily achievement points unlocked by the account.
Requires the progression
scope. This is None
if the scope is missing.
monthly_ap: Option<u16>
The number of monthly achievement points unlocked by the account.
Requires the progression
scope. This is None
if the scope is missing.
wvw_rank: Option<u16>
The WvW rank of the account.
Requires the progression
scope. This is None
if the scope is missing.
last_modified: DateTime<Utc>
The date when the account information was last changed.
build_storage_slots: Option<u64>
The amount of build storage slots unlocked by the account.
Requires the builds
scope. This is None
if the scope is missing.
Implementations§
Source§impl Account
impl Account
Sourcepub fn get<C>(client: &C) -> C::Resultwhere
C: ClientExecutor<Self>,
pub fn get<C>(client: &C) -> C::Resultwhere
C: ClientExecutor<Self>,
Returns the information about the currently authenticated account.
§Authentication
This endpoint requires authentication and returns an Error
if no access token is set.
When authenticated it returns information about the account of the current access token.
§Examples
let client: Client = Client::builder().access_token(token).into();
let account = Account::get(&client).await?;
println!("{:?}", account);
Using the blocking
client:
let client: Client = Client::builder().access_token(token).into();
let account = Account::get(&client)?;
println!("{:?}", account);