-
Notifications
You must be signed in to change notification settings - Fork 9
/
dashboard.go
52 lines (40 loc) · 1.23 KB
/
dashboard.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
44
45
46
47
48
49
50
51
52
package bitclient
type GetMyPullRequestSuggestionsRequest struct {
PagedRequest
ChangeSince uint `url:"changeSince,omitempty"`
Limit uint `url:"limit,omitempty"`
}
type GetMyPullRequestSuggestionsResponse struct {
PagedResponse
Values []PullRequestSuggestion
}
func (bc *BitClient) GetMyPullRequestSuggestions(params GetMyPullRequestSuggestionsRequest) (GetMyPullRequestSuggestionsResponse, error) {
response := GetMyPullRequestSuggestionsResponse{}
_, err := bc.DoGet(
"/dashboard/pull-request-suggestions",
params,
&response,
)
return response, err
}
type GetMyPullRequestsRequest struct {
PagedRequest
State string `url:"state,omitempty"`
Role string `url:"role,omitempty"`
ParticipantStatus string `url:"participantStatus,omitempty"`
Order string `url:"order,omitempty"`
ClosedSince string `url:"closedSince,omitempty"`
}
type GetMyPullRequestsResponse struct {
PagedResponse PagedResponse
PullRequests []PullRequest
}
func (bc *BitClient) GetMyPullRequests(params GetMyPullRequestsRequest) (GetMyPullRequestsResponse, error) {
response := GetMyPullRequestsResponse{}
_, err := bc.DoGet(
"/dashboard/pull-requests",
params,
&response,
)
return response, err
}