mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-10-02 15:48:54 +00:00
API: rename GuildImageType to GuildImageStyle
This commit is contained in:
parent
a298160529
commit
cb0cba93fd
16
api/guild.go
16
api/guild.go
|
@ -282,21 +282,21 @@ func (c *Client) GuildVanityURL(guildID discord.Snowflake) (*discord.Invite, err
|
|||
return inv, c.RequestJSON(&inv, "GET", EndpointGuilds+guildID.String()+"/vanity-url")
|
||||
}
|
||||
|
||||
type GuildImageType string
|
||||
type GuildImageStyle string
|
||||
|
||||
const (
|
||||
GuildShield GuildImageType = "shield"
|
||||
GuildBanner1 GuildImageType = "banner1"
|
||||
GuildBanner2 GuildImageType = "banner2"
|
||||
GuildBanner3 GuildImageType = "banner3"
|
||||
GuildBanner4 GuildImageType = "banner4"
|
||||
GuildShield GuildImageStyle = "shield"
|
||||
GuildBanner1 GuildImageStyle = "banner1"
|
||||
GuildBanner2 GuildImageStyle = "banner2"
|
||||
GuildBanner3 GuildImageStyle = "banner3"
|
||||
GuildBanner4 GuildImageStyle = "banner4"
|
||||
)
|
||||
|
||||
func (c *Client) GuildImageURL(guildID discord.Snowflake, img GuildImageType) string {
|
||||
func (c *Client) GuildImageURL(guildID discord.Snowflake, img GuildImageStyle) string {
|
||||
return EndpointGuilds + guildID.String() + "/widget.png?style=" + string(img)
|
||||
}
|
||||
|
||||
func (c *Client) GuildImage(guildID discord.Snowflake, img GuildImageType) (io.ReadCloser, error) {
|
||||
func (c *Client) GuildImage(guildID discord.Snowflake, img GuildImageStyle) (io.ReadCloser, error) {
|
||||
r, err := c.Request("GET", c.GuildImageURL(guildID, img))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in a new issue