[−][src]Struct dbl::Client
Endpoint interface to Discord Bot List API.
Methods
impl Client
[src]
pub fn new(token: String) -> Result<Self, Error>
[src]
Constructs a new Client
.
pub fn new_with(client: Arc<ReqwestClient>, token: String) -> Self
[src]
Constructs a new Client
with a reqwest
client.
pub fn get<T>(&self, bot: T) -> impl Future<Item = Bot, Error = Error> where
T: Into<BotId>,
[src]
T: Into<BotId>,
Get information about a specific bot.
pub fn search(
&self,
filter: &Filter
) -> impl Future<Item = Listing, Error = Error>
[src]
&self,
filter: &Filter
) -> impl Future<Item = Listing, Error = Error>
Search for bots.
Example
use dbl::types::Filter; let filter = Filter::new().search("lib:serenity foobar");
pub fn stats<T>(&self, bot: T) -> impl Future<Item = Stats, Error = Error> where
T: Into<BotId>,
[src]
T: Into<BotId>,
Get the stats of a bot.
pub fn update_stats<T>(
&self,
bot: T,
stats: ShardStats
) -> impl Future<Item = (), Error = Error> where
T: Into<BotId>,
[src]
&self,
bot: T,
stats: ShardStats
) -> impl Future<Item = (), Error = Error> where
T: Into<BotId>,
Update the stats of a bot.
Example
use dbl::types::ShardStats; let new_stats = ShardStats::Cumulative { server_count: 1234, shard_count: None, };
pub fn votes<T>(&self, bot: T) -> impl Future<Item = Vec<User>, Error = Error> where
T: Into<BotId>,
[src]
T: Into<BotId>,
Get the last 1000 votes for a bot.
pub fn has_voted<T, U>(
&self,
bot: T,
user: U
) -> impl Future<Item = bool, Error = Error> where
T: Into<BotId>,
U: Into<UserId>,
[src]
&self,
bot: T,
user: U
) -> impl Future<Item = bool, Error = Error> where
T: Into<BotId>,
U: Into<UserId>,
Check if a user has voted for a bot in the past 24 hours.
pub fn user<T>(
&self,
user: T
) -> impl Future<Item = DetailedUser, Error = Error> where
T: Into<UserId>,
[src]
&self,
user: T
) -> impl Future<Item = DetailedUser, Error = Error> where
T: Into<UserId>,
Get information about a user.
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,