diff options
Diffstat (limited to 'internal/api/client/account/account.go')
-rw-r--r-- | internal/api/client/account/account.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/internal/api/client/account/account.go b/internal/api/client/account/account.go index 1e4b716f5..94f753825 100644 --- a/internal/api/client/account/account.go +++ b/internal/api/client/account/account.go @@ -57,6 +57,14 @@ const ( GetStatusesPath = BasePathWithID + "/statuses" // GetFollowersPath is for showing an account's followers GetFollowersPath = BasePathWithID + "/followers" + // GetFollowingPath is for showing account's that an account follows. + GetFollowingPath = BasePathWithID + "/following" + // GetRelationshipsPath is for showing an account's relationship with other accounts + GetRelationshipsPath = BasePath + "/relationships" + // FollowPath is for POSTing new follows to, and updating existing follows + PostFollowPath = BasePathWithID + "/follow" + // PostUnfollowPath is for POSTing an unfollow + PostUnfollowPath = BasePathWithID + "/unfollow" ) // Module implements the ClientAPIModule interface for account-related actions @@ -82,6 +90,10 @@ func (m *Module) Route(r router.Router) error { r.AttachHandler(http.MethodPatch, BasePathWithID, m.muxHandler) r.AttachHandler(http.MethodGet, GetStatusesPath, m.AccountStatusesGETHandler) r.AttachHandler(http.MethodGet, GetFollowersPath, m.AccountFollowersGETHandler) + r.AttachHandler(http.MethodGet, GetFollowingPath, m.AccountFollowingGETHandler) + r.AttachHandler(http.MethodGet, GetRelationshipsPath, m.AccountRelationshipsGETHandler) + r.AttachHandler(http.MethodPost, PostFollowPath, m.AccountFollowPOSTHandler) + r.AttachHandler(http.MethodPost, PostUnfollowPath, m.AccountUnfollowPOSTHandler) return nil } |