-
Notifications
You must be signed in to change notification settings - Fork 9
/
inbox.go
43 lines (32 loc) · 861 Bytes
/
inbox.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
37
38
39
40
41
42
43
package bitclient
type GetInboxPullRequestsRequest struct {
PagedRequest
Start uint `url:"start,omitempty"`
Limit uint `url:"limit,omitempty"`
Role string `url:"role,omitempty"`
}
type GetInboxPullRequestsResponse struct {
PagedResponse
Values []PullRequest
}
func (bc *BitClient) GetInboxPullRequests(params GetInboxPullRequestsRequest) (GetInboxPullRequestsResponse, error) {
response := GetInboxPullRequestsResponse{}
_, err := bc.DoGet(
"/inbox/pull-requests",
params,
&response,
)
return response, err
}
type GetInboxPullRequestsCountResponse struct {
Count uint `json:"count"`
}
func (bc *BitClient) GetInboxPullRequestsCount() (GetInboxPullRequestsCountResponse, error) {
response := GetInboxPullRequestsCountResponse{}
_, err := bc.DoGet(
"/inbox/pull-requests/count",
nil,
&response,
)
return response, err
}