~thrrgilag/woodstock

woodstock/precense.go -rw-r--r-- 469 bytes
62b10b5cMorgan McMillian Update for new project location and module name 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package woodstock

// PresencesResult response object
type PresencesResult struct {
	*CommonResponse
	Data []Presence `json:"data"`
}

// GetPresences retrieves precense
// https://pnut.io/docs/resources/users/presence#get-presence
func (c *Client) GetPresences() (result PresencesResult, err error) {
	responseCh := make(chan response)
	c.queryQueue <- query{url: PresenceAPI, data: &result, method: "GET", responseCh: responseCh}
	return result, (<-responseCh).err
}