forked from pothtonswer/discordmuffin
feat(*): dropped more undocumented endpoints
This commit is contained in:
parent
d5c82ad374
commit
a8b351019f
2 changed files with 27 additions and 55 deletions
|
@ -68,7 +68,6 @@ var (
|
||||||
EndpointGuildBan = func(gID, uID string) string { return EndpointGuilds + gID + "/bans/" + uID }
|
EndpointGuildBan = func(gID, uID string) string { return EndpointGuilds + gID + "/bans/" + uID }
|
||||||
EndpointGuildIntegrations = func(gID string) string { return EndpointGuilds + gID + "/integrations" }
|
EndpointGuildIntegrations = func(gID string) string { return EndpointGuilds + gID + "/integrations" }
|
||||||
EndpointGuildIntegration = func(gID, iID string) string { return EndpointGuilds + gID + "/integrations/" + iID }
|
EndpointGuildIntegration = func(gID, iID string) string { return EndpointGuilds + gID + "/integrations/" + iID }
|
||||||
EndpointGuildIntegrationSync = func(gID, iID string) string { return EndpointGuilds + gID + "/integrations/" + iID + "/sync" }
|
|
||||||
EndpointGuildRoles = func(gID string) string { return EndpointGuilds + gID + "/roles" }
|
EndpointGuildRoles = func(gID string) string { return EndpointGuilds + gID + "/roles" }
|
||||||
EndpointGuildRole = func(gID, rID string) string { return EndpointGuilds + gID + "/roles/" + rID }
|
EndpointGuildRole = func(gID, rID string) string { return EndpointGuilds + gID + "/roles/" + rID }
|
||||||
EndpointGuildInvites = func(gID string) string { return EndpointGuilds + gID + "/invites" }
|
EndpointGuildInvites = func(gID string) string { return EndpointGuilds + gID + "/invites" }
|
||||||
|
@ -88,12 +87,11 @@ var (
|
||||||
|
|
||||||
EndpointChannel = func(cID string) string { return EndpointChannels + cID }
|
EndpointChannel = func(cID string) string { return EndpointChannels + cID }
|
||||||
EndpointChannelPermissions = func(cID string) string { return EndpointChannels + cID + "/permissions" }
|
EndpointChannelPermissions = func(cID string) string { return EndpointChannels + cID + "/permissions" }
|
||||||
EndpointChannelPermission = func(cID, tID string) string { return EndpointChannels + cID + "/permissions/" + tID }
|
EndpointChannelPermission = func(cID, tID string) string { return EndpointChannelPermissions(cID) + "/" + tID }
|
||||||
EndpointChannelInvites = func(cID string) string { return EndpointChannels + cID + "/invites" }
|
EndpointChannelInvites = func(cID string) string { return EndpointChannels + cID + "/invites" }
|
||||||
EndpointChannelTyping = func(cID string) string { return EndpointChannels + cID + "/typing" }
|
EndpointChannelTyping = func(cID string) string { return EndpointChannels + cID + "/typing" }
|
||||||
EndpointChannelMessages = func(cID string) string { return EndpointChannels + cID + "/messages" }
|
EndpointChannelMessages = func(cID string) string { return EndpointChannels + cID + "/messages" }
|
||||||
EndpointChannelMessage = func(cID, mID string) string { return EndpointChannels + cID + "/messages/" + mID }
|
EndpointChannelMessage = func(cID, mID string) string { return EndpointChannels + cID + "/messages/" + mID }
|
||||||
EndpointChannelMessageAck = func(cID, mID string) string { return EndpointChannels + cID + "/messages/" + mID + "/ack" }
|
|
||||||
EndpointChannelMessagesBulkDelete = func(cID string) string { return EndpointChannel(cID) + "/messages/bulk-delete" }
|
EndpointChannelMessagesBulkDelete = func(cID string) string { return EndpointChannel(cID) + "/messages/bulk-delete" }
|
||||||
EndpointChannelMessagesPins = func(cID string) string { return EndpointChannel(cID) + "/pins" }
|
EndpointChannelMessagesPins = func(cID string) string { return EndpointChannel(cID) + "/pins" }
|
||||||
EndpointChannelMessagePin = func(cID, mID string) string { return EndpointChannel(cID) + "/pins/" + mID }
|
EndpointChannelMessagePin = func(cID, mID string) string { return EndpointChannel(cID) + "/pins/" + mID }
|
||||||
|
@ -155,8 +153,6 @@ var (
|
||||||
|
|
||||||
EndpointInvite = func(iID string) string { return EndpointAPI + "invites/" + iID }
|
EndpointInvite = func(iID string) string { return EndpointAPI + "invites/" + iID }
|
||||||
|
|
||||||
EndpointIntegrationsJoin = func(iID string) string { return EndpointAPI + "integrations/" + iID + "/join" }
|
|
||||||
|
|
||||||
EndpointEmoji = func(eID string) string { return EndpointCDN + "emojis/" + eID + ".png" }
|
EndpointEmoji = func(eID string) string { return EndpointCDN + "emojis/" + eID + ".png" }
|
||||||
EndpointEmojiAnimated = func(eID string) string { return EndpointCDN + "emojis/" + eID + ".gif" }
|
EndpointEmojiAnimated = func(eID string) string { return EndpointCDN + "emojis/" + eID + ".gif" }
|
||||||
|
|
||||||
|
|
24
restapi.go
24
restapi.go
|
@ -1100,15 +1100,6 @@ func (s *Session) GuildIntegrationDelete(guildID, integrationID string) (err err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// GuildIntegrationSync syncs an integration.
|
|
||||||
// guildID : The ID of a Guild.
|
|
||||||
// integrationID : The ID of an integration.
|
|
||||||
func (s *Session) GuildIntegrationSync(guildID, integrationID string) (err error) {
|
|
||||||
|
|
||||||
_, err = s.RequestWithBucketID("POST", EndpointGuildIntegrationSync(guildID, integrationID), nil, EndpointGuildIntegration(guildID, ""))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// GuildIcon returns an image.Image of a guild icon.
|
// GuildIcon returns an image.Image of a guild icon.
|
||||||
// guildID : The ID of a Guild.
|
// guildID : The ID of a Guild.
|
||||||
func (s *Session) GuildIcon(guildID string) (img image.Image, err error) {
|
func (s *Session) GuildIcon(guildID string) (img image.Image, err error) {
|
||||||
|
@ -1388,21 +1379,6 @@ func (s *Session) ChannelMessage(channelID, messageID string) (st *Message, err
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChannelMessageAck acknowledges and marks the given message as read
|
|
||||||
// channeld : The ID of a Channel
|
|
||||||
// messageID : the ID of a Message
|
|
||||||
// lastToken : token returned by last ack
|
|
||||||
func (s *Session) ChannelMessageAck(channelID, messageID, lastToken string) (st *Ack, err error) {
|
|
||||||
|
|
||||||
body, err := s.RequestWithBucketID("POST", EndpointChannelMessageAck(channelID, messageID), &Ack{Token: lastToken}, EndpointChannelMessageAck(channelID, ""))
|
|
||||||
if err != nil {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
err = unmarshal(body, &st)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// ChannelMessageSend sends a message to the given channel.
|
// ChannelMessageSend sends a message to the given channel.
|
||||||
// channelID : The ID of a Channel.
|
// channelID : The ID of a Channel.
|
||||||
// content : The message to send.
|
// content : The message to send.
|
||||||
|
|
Loading…
Reference in a new issue