aboutsummaryrefslogtreecommitdiff
path: root/src/http
diff options
context:
space:
mode:
authorErk- <[email protected]>2018-08-09 20:34:33 +0200
committerzeyla <[email protected]>2018-08-09 11:34:33 -0700
commit40053a71931bb63c43eb6f469ee3c94383c9e90a (patch)
tree79c2fabc1229d0543205bc6daf8ebebc6ebc9755 /src/http
parent[routing] Fix various incorrect routes. (#364) (diff)
downloadserenity-40053a71931bb63c43eb6f469ee3c94383c9e90a.tar.xz
serenity-40053a71931bb63c43eb6f469ee3c94383c9e90a.zip
Fix all the dead links in the docs
Diffstat (limited to 'src/http')
-rw-r--r--src/http/mod.rs30
-rw-r--r--src/http/ratelimiting.rs6
-rw-r--r--src/http/routing.rs44
3 files changed, 40 insertions, 40 deletions
diff --git a/src/http/mod.rs b/src/http/mod.rs
index d9454c2..d9a6a62 100644
--- a/src/http/mod.rs
+++ b/src/http/mod.rs
@@ -20,7 +20,7 @@
//! instance methods where possible, as they each offer different
//! levels of a high-level interface to the HTTP module.
//!
-//! [`Client`]: ../struct.Client.html
+//! [`Client`]: ../client/struct.Client.html
//! [model]: ../model/index.html
pub mod ratelimiting;
@@ -159,7 +159,7 @@ pub fn add_group_recipient(group_id: u64, user_id: u64) -> Result<()> {
/// [`Guild`]: ../model/guild/struct.Guild.html
/// [`Member`]: ../model/guild/struct.Member.html
/// [`Role`]: ../model/guild/struct.Role.html
-/// [Manage Roles]: ../model/permissions/constant.MANAGE_ROLES.html
+/// [Manage Roles]: ../model/permissions/struct.Permissions.html#associatedconstant.MANAGE_ROLES
pub fn add_member_role(guild_id: u64, user_id: u64, role_id: u64) -> Result<()> {
wind(204, Request {
body: None,
@@ -178,7 +178,7 @@ pub fn add_member_role(guild_id: u64, user_id: u64, role_id: u64) -> Result<()>
///
/// [`Guild`]: ../model/guild/struct.Guild.html
/// [`User`]: ../model/user/struct.User.html
-/// [Ban Members]: ../model/permissions/constant.BAN_MEMBERS.html
+/// [Ban Members]: ../model/permissions/struct.Permissions.html#associatedconstant.BAN_MEMBERS
pub fn ban_user(guild_id: u64, user_id: u64, delete_message_days: u8, reason: &str) -> Result<()> {
wind(204, Request {
body: None,
@@ -201,7 +201,7 @@ pub fn ban_user(guild_id: u64, user_id: u64, delete_message_days: u8, reason: &s
/// **Note**: Requires that you have the [Ban Members] permission.
///
/// [`Guild`]: ../model/guild/struct.Guild.html
-/// [Ban Members]: ../model/permissions/constant.BAN_MEMBERS.html
+/// [Ban Members]: ../model/permissions/struct.Permissions.html#associatedconstant.BAN_MEMBERS
pub fn ban_zeyla(guild_id: u64, delete_message_days: u8, reason: &str) -> Result<()> {
ban_user(guild_id, 114_941_315_417_899_012, delete_message_days, reason)
}
@@ -215,7 +215,7 @@ pub fn ban_zeyla(guild_id: u64, delete_message_days: u8, reason: &str) -> Result
/// **Note**: Requires that you have the [Ban Members] permission.
///
/// [`Guild`]: ../model/guild/struct.Guild.html
-/// [Ban Members]: ../model/permissions/constant.BAN_MEMBERS.html
+/// [Ban Members]: ../model/permissions/struct.Permissions.html#associatedconstant.BAN_MEMBERS
pub fn ban_luna(guild_id: u64, delete_message_days: u8, reason: &str) -> Result<()> {
ban_user(guild_id, 180_731_582_049_550_336, delete_message_days, reason)
}
@@ -229,7 +229,7 @@ pub fn ban_luna(guild_id: u64, delete_message_days: u8, reason: &str) -> Result<
/// **Note**: Requires that you have the [Ban Members] permission.
///
/// [`Guild`]: ../model/guild/struct.Guild.html
-/// [Ban Members]: ../model/permissions/constant.BAN_MEMBERS.html
+/// [Ban Members]: ../model/permissions/struct.Permissions.html#associatedconstant.BAN_MEMBERS
pub fn ban_servermoms(guild_id: u64, delete_message_days: u8, reason: &str) -> Result<()> {
ban_zeyla(guild_id, delete_message_days, reason)?;
ban_luna(guild_id, delete_message_days, reason)
@@ -261,7 +261,7 @@ pub fn broadcast_typing(channel_id: u64) -> Result<()> {
/// [`Guild`]: ../model/guild/struct.Guild.html
/// [`GuildChannel`]: ../model/channel/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/struct.Permissions.html#associatedconstant.MANAGE_CHANNELS
pub fn create_channel(guild_id: u64, map: &Value) -> Result<GuildChannel> {
fire(Request {
body: Some(map.to_string().as_bytes()),
@@ -272,14 +272,14 @@ pub fn create_channel(guild_id: u64, map: &Value) -> Result<GuildChannel> {
/// Creates an emoji in the given [`Guild`] with the given data.
///
-/// View the source code for [`Context::create_emoji`] to see what fields this
-/// requires.
+/// View the source code for [`Guild`]'s [`create_emoji`] method to see what
+/// fields this requires.
///
/// **Note**: Requires the [Manage Emojis] permission.
///
-/// [`Context::create_emoji`]: ../struct.Context.html#method.create_emoji
+/// [`create_emoji`]: ../model/guild/struct.Guild.html#method.create_emoji
/// [`Guild`]: ../model/guild/struct.Guild.html
-/// [Manage Emojis]: ../model/permissions/constant.MANAGE_EMOJIS.html
+/// [Manage Emojis]: ../model/permissions/struct.Permissions.html#associatedconstant.MANAGE_EMOJIS
pub fn create_emoji(guild_id: u64, map: &Value) -> Result<Emoji> {
fire(Request {
body: Some(map.to_string().as_bytes()),
@@ -340,7 +340,7 @@ pub fn create_guild(map: &Value) -> Result<PartialGuild> {
///
/// [`Guild`]: ../model/guild/struct.Guild.html
/// [`Integration`]: ../model/guild/struct.Integration.html
-/// [Manage Guild]: ../model/permissions/constant.MANAGE_GUILD.html
+/// [Manage Guild]: ../model/permissions/struct.Permissions.html#associatedconstant.MANAGE_GUILD
/// [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<()> {
wind(204, Request {
@@ -359,8 +359,8 @@ pub fn create_guild_integration(guild_id: u64, integration_id: u64, map: &Value)
/// **Note**: Requires the [Create Invite] permission.
///
/// [`GuildChannel`]: ../model/channel/struct.GuildChannel.html
-/// [`RichInvite`]: ../model/guild/struct.RichInvite.html
-/// [Create Invite]: ../model/permissions/constant.CREATE_INVITE.html
+/// [`RichInvite`]: ../model/invite/struct.RichInvite.html
+/// [Create Invite]: ../model/permissions/struct.Permissions.html#associatedconstant.CREATE_INVITE
/// [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_vec(map)?;
@@ -1636,7 +1636,7 @@ pub fn remove_ban(guild_id: u64, user_id: u64) -> Result<()> {
/// [`Guild`]: ../model/guild/struct.Guild.html
/// [`Member`]: ../model/guild/struct.Member.html
/// [`Role`]: ../model/guild/struct.Role.html
-/// [Manage Roles]: ../model/permissions/constant.MANAGE_ROLES.html
+/// [Manage Roles]: ../model/permissions/struct.Permissions.html#associatedconstant.MANAGE_ROLES
pub fn remove_member_role(guild_id: u64, user_id: u64, role_id: u64) -> Result<()> {
wind(204, Request {
body: None,
diff --git a/src/http/ratelimiting.rs b/src/http/ratelimiting.rs
index 309ba35..298ca6f 100644
--- a/src/http/ratelimiting.rs
+++ b/src/http/ratelimiting.rs
@@ -8,7 +8,7 @@
//! > For example, `/channels/:channel_id` and
//! > `/channels/:channel_id/messages/:message_id` both take `channel_id` into
//! > account when generating rate limits since it's the major parameter. The
-//! only current major parameters are `channel_id` and `guild_id`.
+//! only current major parameters are `channel_id`, `guild_id` and `webhook_id`.
//!
//! This results in the two URIs of `GET /channels/4/messages/7` and
//! `GET /channels/5/messages/8` being rate limited _separately_. However, the
@@ -98,7 +98,7 @@ lazy_static! {
/// ```
///
/// [`RateLimit`]: struct.RateLimit.html
- /// [`Route`]: enum.Route.html
+ /// [`Route`]: ../routing/enum.Route.html
pub static ref ROUTES: Arc<Mutex<HashMap<Route, Arc<Mutex<RateLimit>>>>> = {
Arc::new(Mutex::new(HashMap::default()))
};
@@ -204,7 +204,7 @@ pub(super) fn perform(req: Request) -> Result<Response> {
/// 429s.
///
/// [`ROUTES`]: struct.ROUTES.html
-/// [`Route`]: enum.Route.html
+/// [`Route`]: ../routing/enum.Route.html
/// [Discord docs]: https://discordapp.com/developers/docs/topics/rate-limits
#[derive(Clone, Debug, Default)]
pub struct RateLimit {
diff --git a/src/http/routing.rs b/src/http/routing.rs
index 81d25a3..52be61c 100644
--- a/src/http/routing.rs
+++ b/src/http/routing.rs
@@ -111,133 +111,133 @@ pub enum Route {
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsId(u64),
/// Route for the `/guilds/:guild_id/bans` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdBans(u64),
/// Route for the `/guilds/:guild_id/audit-logs` path.
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdAuditLogs(u64),
/// Route for the `/guilds/:guild_id/bans/:user_id` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdBansUserId(u64),
/// Route for the `/guilds/:guild_id/channels/:channel_id` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdChannels(u64),
/// Route for the `/guilds/:guild_id/embed` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdEmbed(u64),
/// Route for the `/guilds/:guild_id/emojis` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdEmojis(u64),
/// Route for the `/guilds/:guild_id/emojis/:emoji_id` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdEmojisId(u64),
/// Route for the `/guilds/:guild_id/integrations` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdIntegrations(u64),
/// Route for the `/guilds/:guild_id/integrations/:integration_id` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdIntegrationsId(u64),
/// Route for the `/guilds/:guild_id/integrations/:integration_id/sync`
/// path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdIntegrationsIdSync(u64),
/// Route for the `/guilds/:guild_id/invites` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdInvites(u64),
/// Route for the `/guilds/:guild_id/members` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdMembers(u64),
/// Route for the `/guilds/:guild_id/members/:user_id` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdMembersId(u64),
/// Route for the `/guilds/:guild_id/members/:user_id/roles/:role_id` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdMembersIdRolesId(u64),
/// Route for the `/guilds/:guild_id/members/@me/nick` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdMembersMeNick(u64),
/// Route for the `/guilds/:guild_id/prune` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdPrune(u64),
/// Route for the `/guilds/:guild_id/regions` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdRegions(u64),
/// Route for the `/guilds/:guild_id/roles` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdRoles(u64),
/// Route for the `/guilds/:guild_id/roles/:role_id` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdRolesId(u64),
/// Route for the `/guilds/:guild_id/vanity-url` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdVanityUrl(u64),
/// Route for the `/guilds/:guild_id/webhooks` path.
///
/// The data is the relevant [`GuildId`].
///
- /// [`GuildId`]: struct.GuildId.html
+ /// [`GuildId`]: ../../model/id/struct.GuildId.html
GuildsIdWebhooks(u64),
/// Route for the `/invites/:code` path.
InvitesCode,