[][src]Struct automate::http::HttpAPI

pub struct HttpAPI { /* fields omitted */ }

Struct used to interact with the discord HTTP API.

Implementations

impl HttpAPI[src]

pub fn new(token: &str) -> HttpAPI[src]

pub fn token(&self) -> &String[src]

pub async fn gateway<'_>(&'_ self) -> Result<Gateway, Error>[src]

pub async fn gateway_bot<'_>(&'_ self) -> Result<GatewayBot, Error>[src]

pub async fn audit_logs<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S
) -> Result<AuditLog, Error>
[src]

pub async fn guild<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S
) -> Result<Guild, Error>
[src]

pub async fn create_guild<'_>(
    &'_ self,
    new_guild: NewGuild
) -> Result<Guild, Error>
[src]

pub async fn modify_guild<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    modification: ModifyGuild
) -> Result<Guild, Error>
[src]

pub async fn delete_guild<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S
) -> Result<(), Error>
[src]

pub async fn channels<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S
) -> Result<Vec<GuildChannel>, Error>
[src]

pub async fn channel<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S
) -> Result<Channel, Error>
[src]

pub async fn create_channel<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    new_channel: NewChannel
) -> Result<GuildChannel, Error>
[src]

pub async fn modify_channel<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    modification: ModifyChannel
) -> Result<Channel, Error>
[src]

pub async fn move_channels<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    moves: Vec<MoveChannel>
) -> Result<(), Error>
[src]

pub async fn delete_channel<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S
) -> Result<Channel, Error>
[src]

pub async fn member<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    user: S
) -> Result<GuildMember, Error>
[src]

pub async fn members<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    filter: MemberFilter
) -> Result<Vec<GuildMember>, Error>
[src]

pub async fn modify_member<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    user: S,
    member: ModifyMember
) -> Result<(), Error>
[src]

pub async fn remove_member<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    user: S
) -> Result<(), Error>
[src]

pub async fn modify_own_nick<S: ExtractSnowflake, '_, '_>(
    &'_ self,
    guild: S,
    nick: &'_ str
) -> Result<(), Error>
[src]

pub async fn member_add_role<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    user: S,
    role: S
) -> Result<(), Error>
[src]

pub async fn member_remove_role<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    user: S,
    role: S
) -> Result<(), Error>
[src]

pub async fn bans<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S
) -> Result<Vec<Ban>, Error>
[src]

pub async fn ban<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    user: S
) -> Result<Ban, Error>
[src]

pub async fn create_ban<S: ExtractSnowflake, '_, '_>(
    &'_ self,
    guild: S,
    user: S,
    reason: Option<&'_ str>,
    delete_days: Option<i8>
) -> Result<(), Error>
[src]

pub async fn remove_ban<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    user: S
) -> Result<(), Error>
[src]

pub async fn roles<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S
) -> Result<Vec<Role>, Error>
[src]

pub async fn create_role<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    role: NewRole
) -> Result<Role, Error>
[src]

pub async fn modify_roles<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    role: S,
    modification: ModifyRole
) -> Result<Role, Error>
[src]

pub async fn move_roles<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    roles: Vec<MoveRole>
) -> Result<Vec<Role>, Error>
[src]

pub async fn remove_role<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    role: S
) -> Result<(), Error>
[src]

pub async fn simulate_prune<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    days: i32
) -> Result<Prune, Error>
[src]

pub async fn prune<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    days: i32
) -> Result<(), Error>
[src]

pub async fn prune_with_report<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    days: i32
) -> Result<Prune, Error>
[src]

pub async fn voice_regions<'_>(&'_ self) -> Result<Vec<VoiceRegion>, Error>[src]

pub async fn guild_voice_regions<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S
) -> Result<Vec<VoiceRegion>, Error>
[src]

pub async fn integrations<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S
) -> Result<Vec<Integration>, Error>
[src]

pub async fn embed<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S
) -> Result<GuildEmbed, Error>
[src]

pub async fn modify_embed<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    embed: GuildEmbed
) -> Result<GuildEmbed, Error>
[src]

pub async fn vanity_url<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S
) -> Result<PartialInvite, Error>
[src]

pub async fn message<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    message: S
) -> Result<Message, Error>
[src]

pub async fn messages<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    messages: MessagesPosition
) -> Result<Vec<Message>, Error>
[src]

pub async fn create_message<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    __arg2: CreateMessage
) -> Result<Message, Error>
[src]

pub async fn modify_message<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    message: S,
    modification: ModifyMessage
) -> Result<Message, Error>
[src]

pub async fn delete_message<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    message: S
) -> Result<(), Error>
[src]

pub async fn delete_message_bulk<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    messages: Vec<S>
) -> Result<(), Error>
[src]

pub async fn reactions<S: ExtractSnowflake, U: WriteUrl, '_, '_>(
    &'_ self,
    channel: S,
    message: S,
    emoji: &'_ U,
    reactions: ReactionsPosition
) -> Result<Vec<User>, Error>
[src]

pub async fn create_reaction<S: ExtractSnowflake, U: WriteUrl, '_, '_>(
    &'_ self,
    channel: S,
    message: S,
    emoji: &'_ U
) -> Result<(), Error>
[src]

pub async fn delete_reaction<S: ExtractSnowflake, U: WriteUrl, '_, '_>(
    &'_ self,
    channel: S,
    message: S,
    emoji: &'_ U,
    user: S
) -> Result<(), Error>
[src]

pub async fn delete_own_reaction<S: ExtractSnowflake, U: WriteUrl, '_, '_>(
    &'_ self,
    channel: S,
    message: S,
    emoji: &'_ U
) -> Result<(), Error>
[src]

pub async fn delete_all_reaction<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    message: S
) -> Result<(), Error>
[src]

pub async fn emojis<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S
) -> Result<Vec<Emoji>, Error>
[src]

pub async fn emoji<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    emoji: S
) -> Result<Emoji, Error>
[src]

pub async fn create_emoji<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    emoji: NewEmoji
) -> Result<Emoji, Error>
[src]

pub async fn modify_emoji<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    emoji: S,
    modification: ModifyEmoji
) -> Result<Emoji, Error>
[src]

pub async fn delete_emoji<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S,
    emoji: S
) -> Result<(), Error>
[src]

pub async fn invite<'_, '_>(&'_ self, code: &'_ str) -> Result<Invite, Error>[src]

pub async fn invite_with_counts<'_, '_>(
    &'_ self,
    code: &'_ str
) -> Result<Invite, Error>
[src]

pub async fn guild_invites<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S
) -> Result<Vec<Invite>, Error>
[src]

pub async fn channel_invites<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S
) -> Result<Vec<Invite>, Error>
[src]

pub async fn create_invite<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    invite: NewInvite
) -> Result<Invite, Error>
[src]

pub async fn delete_invite<'_, '_>(
    &'_ self,
    code: &'_ str
) -> Result<Invite, Error>
[src]

pub async fn modify_channel_permissions<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    overwrite: S,
    permissions: NewOverwrite
) -> Result<(), Error>
[src]

pub async fn delete_channel_permission<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    overwrite: S
) -> Result<(), Error>
[src]

pub async fn trigger_typing<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S
) -> Result<(), Error>
[src]

pub async fn pinned_messages<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S
) -> Result<Vec<Message>, Error>
[src]

pub async fn pin_message<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    message: S
) -> Result<(), Error>
[src]

pub async fn unpin_message<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    message: S
) -> Result<(), Error>
[src]

pub async fn curent_user<'_>(&'_ self) -> Result<User, Error>[src]

pub async fn modify_current_user<'_>(
    &'_ self,
    bot: ModifyBot
) -> Result<User, Error>
[src]

pub async fn bot_guilds<'_>(&'_ self) -> Result<Vec<PartialGuild>, Error>[src]

pub async fn leave_guild<S: ExtractSnowflake, '_>(
    &'_ self,
    guild: S
) -> Result<(), Error>
[src]

pub async fn user<S: ExtractSnowflake, '_>(
    &'_ self,
    user: S
) -> Result<User, Error>
[src]

pub async fn create_dm<S: ExtractSnowflake, '_>(
    &'_ self,
    recipient: S
) -> Result<DirectChannel, Error>
[src]

pub async fn add_dm_recipient<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    user: S,
    recipient: Recipient
) -> Result<(), Error>
[src]

pub async fn remove_dm_recipient<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S,
    user: S
) -> Result<(), Error>
[src]

pub async fn close_dm<S: ExtractSnowflake, '_>(
    &'_ self,
    channel: S
) -> Result<PrivateChannel, Error>
[src]

Trait Implementations

impl Clone for HttpAPI[src]

Auto Trait Implementations

impl !RefUnwindSafe for HttpAPI

impl Send for HttpAPI

impl Sync for HttpAPI

impl Unpin for HttpAPI

impl !UnwindSafe for HttpAPI

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,