github.com/daeMOn63/bitclient@v0.0.0-20190425080230-bfee94efac35/inbox.go (about) 1 package bitclient 2 3 type GetInboxPullRequestsRequest struct { 4 PagedRequest 5 Start uint `url:"start,omitempty"` 6 Limit uint `url:"limit,omitempty"` 7 Role string `url:"role,omitempty"` 8 } 9 10 type GetInboxPullRequestsResponse struct { 11 PagedResponse 12 Values []PullRequest 13 } 14 15 func (bc *BitClient) GetInboxPullRequests(params GetInboxPullRequestsRequest) (GetInboxPullRequestsResponse, error) { 16 17 response := GetInboxPullRequestsResponse{} 18 19 _, err := bc.DoGet( 20 "/inbox/pull-requests", 21 params, 22 &response, 23 ) 24 25 return response, err 26 } 27 28 type GetInboxPullRequestsCountResponse struct { 29 Count uint `json:"count"` 30 } 31 32 func (bc *BitClient) GetInboxPullRequestsCount() (GetInboxPullRequestsCountResponse, error) { 33 34 response := GetInboxPullRequestsCountResponse{} 35 36 _, err := bc.DoGet( 37 "/inbox/pull-requests/count", 38 nil, 39 &response, 40 ) 41 42 return response, err 43 }