Follower/Following lists #2
Labels
No labels
backend
beginner-friendly
bug
build
db
endpoint
federation
http
low-priority
tests
waiting for zig 0.11
web
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#4 Home Timeline
heartles/fediglam
Reference: heartles/fediglam#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I've got 2 different ideas for an api here:
In either case, follow relations will have a
status
enum attached to them that can be in eitheractive
orpending
states (wherepending
represents a follow request that has not been accepted/denied yet)Option 1: user based
GET /users/:id/following
GET /users/:id/followers
POST /users/:my_id/following
- create follow requestDELETE /users/:my_id/following/:followee_id
- cancel follow request or unfollowGET /users/:my_id/following?status=pending
- list outgoing follow requests`PUT /users/:my_id/followers/:follower_id' - approve follow request
DELETE /users/:my_id/followers/:follower_id
- deny follower request or force unfollowGET /users/:my_id/followers?status=pending
- list incoming follow requestsPros:
Cons:
Option 2: resource based
GET /follows?actor=:id
- list users that actor followsGET /follows?target=:id
- list followers of targetGET /follows?actor=:my_id&status=pending
- list outgoing follow requestsGET /follows?target=:my_id&status=pending
- list incoming follow requestsPOST /follows
- create follow requestPUT /follows/:id
- Approve follow requestDELETE /follows/:id
- Deny follow request, force unfollow, cancel follow request, or unfollow depending on id statePros:
Cons:
actor
andtarget
above)This is partly implemented right now but it's missing a mechanism for follow requests, and I don't like the API. Leaving this issue open until its resolved.
Generally my thought re: api stuff is that I think the way other servers did it has it right, with just treating follow requests as their own resource in themselves and scrapping REST for a more RPC style api
In hindsight, follow requests should go in a different issue, after profile updates.
Closing with
252c124