pub struct Client { /* fields omitted */ }
Struct which defines the methods necessary to interact with the service.
To bring in the API client:
use discord_bots_org::ReqwestSyncClient;
Creates a new client to interact with the API.
This accepts an existing reqwest Client so a single HTTP client may be
shared across your application.
Create a new API client:
extern crate reqwest;
use discord_bots_org::ReqwestSyncClient as ApiClient;
use reqwest::Client as ReqwestClient;
use std::sync::Arc;
let reqwest_client = Arc::new(ReqwestClient::new());
let client = ApiClient::new(Arc::clone(&reqwest_client));
Retrieves information about a bot.
Retrieves a list of bots via a search.
Retrieves information about a bot's specific stats.
Retrieve whether a user has upvoted a bot in the last 24 hours.
You can use this if your bot has over 1000 votes.
Retrieves information to see who has upvoted a bot.
Note: If your bot has over 1000 votes per month, then this can not
be used. Webhooks must instead be used.
Retrieves information about a user.
pub fn post_stats( &self, auth: impl AsRef<str>, bot_id: u64, stats: &ShardStats ) -> Result<()> | [src] |
Posts a bot's shard stats.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more