API: add UserConnections method (#55)

This commit is contained in:
mavolin 2020-05-15 19:31:23 +02:00
parent a963ea46f1
commit 4eef15ec7d
No known key found for this signature in database
GPG Key ID: D8681218EDF216DF
1 changed files with 6 additions and 1 deletions

View File

@ -82,4 +82,9 @@ func (c *Client) CreatePrivateChannel(recipientID discord.Snowflake) (*discord.C
// shitty SDK, don't care, PR welcomed
// func (c *Client) CreateGroup(tokens []string, nicks map[])
// func (c *Client) UserConnections() ([]discord.Connection, error) {}
// UserConnections returns a list of connection objects. Requires the
// connections OAuth2 scope.
func (c *Client) UserConnections() ([]discord.Connection, error) {
var conn []discord.Connection
return conn, c.RequestJSON(&conn, "GET", EndpointMe+"/connections")
}