forked from zoom-lib-golang/zoom-lib-golang
/
user_list.go
36 lines (31 loc) · 1.09 KB
/
user_list.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package zoom
// ListUsersPath - v2 path for listing users
const ListUsersPath = "/users"
// ListUsersResponse contains the response from a call to ListUsers
type ListUsersResponse struct {
TotalRecords int `json:"total_records"`
PageCount int `json:"page_count"`
PageNumber int `json:"page_number"`
PageSize int `json:"page_size"`
Users []User `json:"users"`
}
// ListUsersOptions contains options for ListUsers
type ListUsersOptions struct {
PageSize int `url:"page_size"`
PageNumber int `url:"page_number"`
Status *UserStatus `url:"status,omitempty"`
}
// ListUsers calls /user/list, listing all users, using the default client
func ListUsers(opts ListUsersOptions) (ListUsersResponse, error) {
return defaultClient.ListUsers(opts)
}
// ListUsers calls /user/list, listing all users, using client c
func (c *Client) ListUsers(opts ListUsersOptions) (ListUsersResponse, error) {
var ret = ListUsersResponse{}
return ret, c.requestV2(requestV2Opts{
Method: Get,
Path: ListUsersPath,
URLParameters: opts,
Ret: &ret,
})
}