aboutsummaryrefslogtreecommitdiff
path: root/service/service.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/service.go')
-rw-r--r--service/service.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/service/service.go b/service/service.go
index db44e10..088bcf4 100644
--- a/service/service.go
+++ b/service/service.go
@@ -486,6 +486,18 @@ func (s *service) UserPage(c *client, id string, pageType string,
nextLink = fmt.Sprintf("/user/%s/likes?max_id=%s",
id, pg.MaxID)
}
+ case "requests":
+ if !isCurrent {
+ return errInvalidArgument
+ }
+ users, err = c.GetFollowRequests(ctx, &pg)
+ if err != nil {
+ return
+ }
+ if len(users) == 20 && len(pg.MaxID) > 0 {
+ nextLink = fmt.Sprintf("/user/%s/requests?max_id=%s",
+ id, pg.MaxID)
+ }
default:
return errInvalidArgument
}
@@ -817,6 +829,14 @@ func (s *service) UnFollow(c *client, id string) (err error) {
return
}
+func (s *service) Accept(c *client, id string) (err error) {
+ return c.FollowRequestAuthorize(ctx, id)
+}
+
+func (s *service) Reject(c *client, id string) (err error) {
+ return c.FollowRequestReject(ctx, id)
+}
+
func (s *service) Mute(c *client, id string) (err error) {
_, err = c.AccountMute(ctx, id)
return