pub struct Omniplex { /* private fields */ }Implementations§
Source§impl Omniplex
impl Omniplex
pub fn new() -> Self
pub fn with_token(token: impl Into<String>) -> Self
pub fn builder() -> OmniplexBuilder
pub fn base_url(&self) -> &str
pub async fn get_bot(&self, id: &str, include_long: bool) -> Result<Value>
pub async fn get_server(&self, id: &str, include_long: bool) -> Result<Value>
pub async fn get_user(&self, id: &str) -> Result<Value>
pub async fn get_bot_vote( &self, bot_id: &str, user_id: &str, ) -> Result<UserVote>
pub async fn get_server_vote( &self, server_id: &str, user_id: &str, ) -> Result<UserVote>
pub async fn has_voted(&self, bot_id: &str, user_id: &str) -> Result<bool>
pub async fn has_voted_for_server( &self, server_id: &str, user_id: &str, ) -> Result<bool>
pub async fn post_bot_stats(&self, stats: &BotStats) -> Result<()>
pub async fn post_server_stats(&self, stats: &ServerStats) -> Result<()>
pub fn auto_post_bot_stats<F, Fut>( &self, every: Duration, get_stats: F, ) -> AutoPoster
pub fn auto_post_bot_stats_with<F, Fut, R>( &self, every: Duration, get_stats: F, on_result: R, ) -> AutoPoster
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Omniplex
impl !UnwindSafe for Omniplex
impl Freeze for Omniplex
impl Send for Omniplex
impl Sync for Omniplex
impl Unpin for Omniplex
impl UnsafeUnpin for Omniplex
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