diff options
| author | Zeyla Hellyer <[email protected]> | 2017-05-24 08:00:07 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-05-24 17:31:48 -0700 |
| commit | a5b3972849bae363ba22b21454e79ca8e84913f1 (patch) | |
| tree | 02a8c8f9b4f439b611671ee11bab195c652b3c64 /src/http | |
| parent | Re-order methods/fields in the framework (diff) | |
| download | serenity-a5b3972849bae363ba22b21454e79ca8e84913f1.tar.xz serenity-a5b3972849bae363ba22b21454e79ca8e84913f1.zip | |
Fix broken docs links in http module
Diffstat (limited to 'src/http')
| -rw-r--r-- | src/http/mod.rs | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/src/http/mod.rs b/src/http/mod.rs index 8c7f4c4..d15cf45 100644 --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -22,7 +22,7 @@ //! //! [`Client`]: ../struct.Client.html //! [`Context`]: ../struct.Context.html -//! [model]: ../../model/index.html +//! [model]: ../model/index.html pub mod ratelimiting; @@ -87,9 +87,9 @@ pub fn set_token(token: &str) { /// /// **Note**: Groups have a limit of 10 recipients, including the current user. /// -/// [`Group`]: ../../model/struct.Group.html -/// [`Group::add_recipient`]: ../../model/struct.Group.html#method.add_recipient -/// [`User`]: ../../model/struct.User.html +/// [`Group`]: ../model/struct.Group.html +/// [`Group::add_recipient`]: ../model/struct.Group.html#method.add_recipient +/// [`User`]: ../model/struct.User.html pub fn add_group_recipient(group_id: u64, user_id: u64) -> Result<()> { verify(204, request!(Route::None, put, @@ -103,10 +103,10 @@ pub fn add_group_recipient(group_id: u64, user_id: u64) -> Result<()> { /// **Note**: Requires the [Manage Roles] permission and respect of role /// hierarchy. /// -/// [`Guild`]: ../../model/struct.Guild.html -/// [`Member`]: ../../model/struct.Member.html -/// [`Role`]: ../../model/struct.Role.html -/// [Manage Roles]: ../../model/permissions/constant.MANAGE_ROLES.html +/// [`Guild`]: ../model/struct.Guild.html +/// [`Member`]: ../model/struct.Member.html +/// [`Role`]: ../model/struct.Role.html +/// [Manage Roles]: ../model/permissions/constant.MANAGE_ROLES.html pub fn add_member_role(guild_id: u64, user_id: u64, role_id: u64) -> Result<()> { verify(204, request!(Route::GuildsIdMembersIdRolesId(guild_id), put, @@ -124,9 +124,9 @@ pub fn add_member_role(guild_id: u64, user_id: u64, role_id: u64) -> Result<()> /// /// **Note**: Requires that you have the [Ban Members] permission. /// -/// [`Guild`]: ../../model/struct.Guild.html -/// [`User`]: ../../model/struct.User.html -/// [Ban Members]: ../../model/permissions/constant.BAN_MEMBERS.html +/// [`Guild`]: ../model/struct.Guild.html +/// [`User`]: ../model/struct.User.html +/// [Ban Members]: ../model/permissions/constant.BAN_MEMBERS.html pub fn ban_user(guild_id: u64, user_id: u64, delete_message_days: u8) -> Result<()> { verify(204, request!(Route::GuildsIdBansUserId(guild_id), put, @@ -144,7 +144,7 @@ pub fn ban_user(guild_id: u64, user_id: u64, delete_message_days: u8) -> Result< /// This should rarely be used for bots, although it is a good indicator that a /// long-running command is still being processed. /// -/// [`Channel`]: ../../model/enum.Channel.html +/// [`Channel`]: ../model/enum.Channel.html pub fn broadcast_typing(channel_id: u64) -> Result<()> { verify(204, request!(Route::ChannelsIdTyping(channel_id), post, @@ -158,10 +158,10 @@ pub fn broadcast_typing(channel_id: u64) -> Result<()> { /// /// **Note**: Requires the [Manage Channels] permission. /// -/// [`Guild`]: ../../model/struct.Guild.html -/// [`GuildChannel`]: ../../model/struct.GuildChannel.html +/// [`Guild`]: ../model/struct.Guild.html +/// [`GuildChannel`]: ../model/struct.GuildChannel.html /// [docs]: https://discordapp.com/developers/docs/resources/guild#create-guild-channel -/// [Manage Channels]: ../../model/permissions/constant.MANAGE_CHANNELS.html +/// [Manage Channels]: ../model/permissions/constant.MANAGE_CHANNELS.html pub fn create_channel(guild_id: u64, map: &Value) -> Result<GuildChannel> { let body = map.to_string(); let response = request!(Route::GuildsIdChannels(guild_id), @@ -180,8 +180,8 @@ pub fn create_channel(guild_id: u64, map: &Value) -> Result<GuildChannel> { /// **Note**: Requires the [Manage Emojis] permission. /// /// [`Context::create_emoji`]: ../struct.Context.html#method.create_emoji -/// [`Guild`]: ../../model/struct.Guild.html -/// [Manage Emojis]: ../../model/permissions/constant.MANAGE_EMOJIS.html +/// [`Guild`]: ../model/struct.Guild.html +/// [Manage Emojis]: ../model/permissions/constant.MANAGE_EMOJIS.html pub fn create_emoji(guild_id: u64, map: &Value) -> Result<Emoji> { let body = map.to_string(); let response = request!(Route::GuildsIdEmojis(guild_id), @@ -220,11 +220,11 @@ pub fn create_emoji(guild_id: u64, map: &Value) -> Result<Emoji> { /// let _result = http::create_guild(map); /// ``` /// -/// [`Guild`]: ../../model/struct.Guild.html -/// [`PartialGuild`]: ../../model/struct.PartialGuild.html +/// [`Guild`]: ../model/struct.Guild.html +/// [`PartialGuild`]: ../model/struct.PartialGuild.html /// [`Shard`]: ../gateway/struct.Shard.html /// [GameBridge]: https://discordapp.com/developers/docs/topics/gamebridge -/// [US West Region]: ../../model/enum.Region.html#variant.UsWest +/// [US West Region]: ../model/enum.Region.html#variant.UsWest /// [documentation on this endpoint]: https://discordapp.com/developers/docs/resources/guild#create-guild /// [whitelist]: https://discordapp.com/developers/docs/resources/guild#create-guild pub fn create_guild(map: &Value) -> Result<PartialGuild> { @@ -240,9 +240,9 @@ pub fn create_guild(map: &Value) -> Result<PartialGuild> { /// /// **Note**: Requires the [Manage Guild] permission. /// -/// [`Guild`]: ../../model/struct.Guild.html -/// [`Integration`]: ../../model/struct.Integration.html -/// [Manage Guild]: ../../model/permissions/constant.MANAGE_GUILD.html +/// [`Guild`]: ../model/struct.Guild.html +/// [`Integration`]: ../model/struct.Integration.html +/// [Manage Guild]: ../model/permissions/constant.MANAGE_GUILD.html /// [docs]: https://discordapp.com/developers/docs/resources/guild#create-guild-integration pub fn create_guild_integration(guild_id: u64, integration_id: u64, map: &Value) -> Result<()> { let body = map.to_string(); @@ -262,9 +262,9 @@ pub fn create_guild_integration(guild_id: u64, integration_id: u64, map: &Value) /// /// **Note**: Requires the [Create Invite] permission. /// -/// [`GuildChannel`]: ../../model/struct.GuildChannel.html -/// [`RichInvite`]: ../../model/struct.RichInvite.html -/// [Create Invite]: ../../model/permissions/constant.CREATE_INVITE.html +/// [`GuildChannel`]: ../model/struct.GuildChannel.html +/// [`RichInvite`]: ../model/struct.RichInvite.html +/// [Create Invite]: ../model/permissions/constant.CREATE_INVITE.html /// [docs]: https://discordapp.com/developers/docs/resources/channel#create-channel-invite pub fn create_invite(channel_id: u64, map: &JsonMap) -> Result<RichInvite> { let body = serde_json::to_string(map)?; @@ -350,7 +350,7 @@ pub fn create_role(guild_id: u64, map: &JsonMap) -> Result<Role> { /// let webhook = http::create_webhook(channel_id, map).expect("Error creating"); /// ``` /// -/// [`GuildChannel`]: ../../model/struct.GuildChannel.html +/// [`GuildChannel`]: ../model/struct.GuildChannel.html pub fn create_webhook(channel_id: u64, map: &Value) -> Result<Webhook> { let body = map.to_string(); let response = request!(Route::ChannelsIdWebhooks(channel_id), @@ -441,8 +441,8 @@ pub fn delete_messages(channel_id: u64, map: &Value) -> Result<()> { /// .expect("Error deleting reactions"); /// ``` /// -/// [`Message`]: ../../model/struct.Message.html -/// [`Reaction`]: ../../model/struct.Reaction.html +/// [`Message`]: ../model/struct.Message.html +/// [`Reaction`]: ../model/struct.Reaction.html pub fn delete_message_reactions(channel_id: u64, message_id: u64) -> Result<()> { verify(204, request!(Route::ChannelsIdMessagesIdReactions(channel_id), delete, @@ -507,7 +507,7 @@ pub fn delete_role(guild_id: u64, role_id: u64) -> Result<()> { /// http::delete_webhook(245037420704169985).expect("Error deleting webhook"); /// ``` /// -/// [`Webhook`]: ../../model/struct.Webhook.html +/// [`Webhook`]: ../model/struct.Webhook.html /// [`delete_webhook_with_token`]: fn.delete_webhook_with_token.html pub fn delete_webhook(webhook_id: u64) -> Result<()> { verify(204, request!(Route::WebhooksId, delete, "/webhooks/{}", webhook_id)) @@ -530,7 +530,7 @@ pub fn delete_webhook(webhook_id: u64) -> Result<()> { /// http::delete_webhook_with_token(id, token).expect("Error deleting webhook"); /// ``` /// -/// [`Webhook`]: ../../model/struct.Webhook.html +/// [`Webhook`]: ../model/struct.Webhook.html pub fn delete_webhook_with_token(webhook_id: u64, token: &str) -> Result<()> { let client = HyperClient::new(); verify(204, retry(|| client @@ -574,7 +574,7 @@ pub fn edit_guild(guild_id: u64, map: &JsonMap) -> Result<PartialGuild> { /// Edits a [`Guild`]'s embed setting. /// -/// [`Guild`]: ../../model/struct.Guild.html +/// [`Guild`]: ../model/struct.Guild.html pub fn edit_guild_embed(guild_id: u64, map: &Value) -> Result<GuildEmbed> { let body = map.to_string(); let response = request!(Route::GuildsIdEmbed(guild_id), @@ -614,7 +614,7 @@ pub fn edit_message(channel_id: u64, message_id: u64, map: &Value) -> Result<Mes /// /// Pass `None` to reset the nickname. /// -/// [`Guild`]: ../../model/struct.Guild.html +/// [`Guild`]: ../model/struct.Guild.html pub fn edit_nickname(guild_id: u64, new_nickname: Option<&str>) -> Result<()> { let map = json!({ "nick": new_nickname @@ -806,8 +806,8 @@ pub fn edit_webhook_with_token(webhook_id: u64, token: &str, map: &JsonMap) -> R /// }, /// }; /// -/// [`Channel`]: ../../model/enum.Channel.html -/// [`Message`]: ../../model/struct.Message.html +/// [`Channel`]: ../model/enum.Channel.html +/// [`Message`]: ../model/struct.Message.html /// [Discord docs]: https://discordapp.com/developers/docs/resources/webhook#querystring-params pub fn execute_webhook(webhook_id: u64, token: &str, map: &JsonMap) -> Result<Message> { let body = serde_json::to_string(map)?; @@ -898,7 +898,7 @@ pub fn get_channel_invites(channel_id: u64) -> Result<Vec<RichInvite>> { /// .expect("Error getting channel webhooks"); /// ``` /// -/// [`GuildChannel`]: ../../model/struct.GuildChannel.html +/// [`GuildChannel`]: ../model/struct.GuildChannel.html pub fn get_channel_webhooks(channel_id: u64) -> Result<Vec<Webhook>> { let response = request!(Route::ChannelsIdWebhooks(channel_id), get, @@ -1052,7 +1052,7 @@ pub fn get_guild_prune_count(guild_id: u64, map: &Value) -> Result<GuildPrune> { /// Gets regions that a guild can use. If a guild has [`Feature::VipRegions`] /// enabled, then additional VIP-only regions are returned. /// -/// [`Feature::VipRegions`]: ../../model/enum.Feature.html#variant.VipRegions +/// [`Feature::VipRegions`]: ../model/enum.Feature.html#variant.VipRegions pub fn get_guild_regions(guild_id: u64) -> Result<Vec<VoiceRegion>> { let response = request!(Route::GuildsIdRegions(guild_id), get, @@ -1064,7 +1064,7 @@ pub fn get_guild_regions(guild_id: u64) -> Result<Vec<VoiceRegion>> { /// Retrieves a list of roles in a [`Guild`]. /// -/// [`Guild`]: ../../model/struct.Guild.html +/// [`Guild`]: ../model/struct.Guild.html pub fn get_guild_roles(guild_id: u64) -> Result<Vec<Role>> { let response = request!(Route::GuildsIdRoles(guild_id), get, @@ -1091,7 +1091,7 @@ pub fn get_guild_roles(guild_id: u64) -> Result<Vec<Role>> { /// .expect("Error getting guild webhooks"); /// ``` /// -/// [`Guild`]: ../../model/struct.Guild.html +/// [`Guild`]: ../model/struct.Guild.html pub fn get_guild_webhooks(guild_id: u64) -> Result<Vec<Webhook>> { let response = request!(Route::GuildsIdWebhooks(guild_id), get, @@ -1437,10 +1437,10 @@ pub fn remove_ban(guild_id: u64, user_id: u64) -> Result<()> { /// **Note**: Requires the [Manage Roles] permission and respect of role /// hierarchy. /// -/// [`Guild`]: ../../model/struct.Guild.html -/// [`Member`]: ../../model/struct.Member.html -/// [`Role`]: ../../model/struct.Role.html -/// [Manage Roles]: ../../model/permissions/constant.MANAGE_ROLES.html +/// [`Guild`]: ../model/struct.Guild.html +/// [`Member`]: ../model/struct.Member.html +/// [`Role`]: ../model/struct.Role.html +/// [Manage Roles]: ../model/permissions/constant.MANAGE_ROLES.html pub fn remove_member_role(guild_id: u64, user_id: u64, role_id: u64) -> Result<()> { verify(204, request!(Route::GuildsIdMembersIdRolesId(guild_id), delete, |