Merge pull request #16 from 178inaba/follow_requests
Add FollowRequestAuthorize and FollowRequestReject
This commit is contained in:
commit
c17c887064
4 changed files with 73 additions and 6 deletions
10
accounts.go
10
accounts.go
|
@ -241,3 +241,13 @@ func (c *Client) GetFollowRequests() ([]*Account, error) {
|
|||
}
|
||||
return accounts, nil
|
||||
}
|
||||
|
||||
// FollowRequestAuthorize is authorize the follow request of user with id.
|
||||
func (c *Client) FollowRequestAuthorize(id int64) error {
|
||||
return c.doAPI(http.MethodPost, fmt.Sprintf("/api/v1/follow_requests/%d/authorize", id), nil, nil)
|
||||
}
|
||||
|
||||
// FollowRequestReject is rejects the follow request of user with id.
|
||||
func (c *Client) FollowRequestReject(id int64) error {
|
||||
return c.doAPI(http.MethodPost, fmt.Sprintf("/api/v1/follow_requests/%d/reject", id), nil, nil)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue