Implement API Routes
dykatz opened this issue · comments
Needed for federating with other servers as well as using 3rd party apps.
There are a couple existing projects that we are trying to be (somewhat) compatable with:
- Mastodon
- Pleroma (for chat and custom emoji reactions)
- Quote posts are only found in fedibird and soapbox, but I can't find any reference information about them 🙃
Here are the APIs that we need to implement (VERY INCOMPLETE):
- Apps
- Create
POST /api/v1/apps
- Verify
GET /api/v1/apps/verify_credentials
- OAuth
- Authorize
GET /oauth/authorize
- Obtain token
POST /oauth/token
- Revoke token
POST /oauth/revoke
- Authorize
- Emails
- Resend confirmation email
POST /api/v1/emails/confirmation
- Resend confirmation email
- Create
- Accounts
- Register
POST /api/v1/accounts
- Verify
GET /api/v1/accounts/verify_credentials
- Update
PATCH /api/v1/accounts/update_credentials
- Get
GET /api/v1/accounts/:id
- Statuses
GET /api/v1/accounts/:id/statuses
- Followers
GET /api/v1/accounts/:id/followers
- Following
GET /api/v1/accounts/:id/following
- Featured tags
GET /api/v1/accounts/:id/featured_tags
- In lists
GET /api/v1/accounts/:id/lists
- Follow
POST /api/v1/accounts/:id/follow
- Unfollow
POST /api/v1/accounts/:id/unfollow
- Remove from followers
POST /api/v1/accounts/:id/remove_from_followers
- Block
POST /api/v1/accounts/:id/block
- Unblock
POST /api/v1/accounts/:id/unblock
- Mute
POST /api/v1/accounts/:id/mute
- Unmute
POST /api/v1/accounts/:id/unmute
- Pin
POST /api/v1/accounts/:id/pin
- Unpin
POST /api/v1/accounts/:id/unpin
- Note
POST /api/v1/accounts/:id/note
- Relationships
GET /api/v1/accounts/relationships
- Fimiliar follows
GET /api/v1/accounts/familiar_followers
- Search
GET /api/v1/accounts/search
- Lookup
GET /api/v1/accounts/lookup
- View muted accounts
GET /api/v1/mutes
- View blocked accounts
GET /api/v1/blocks
- View bookmarks
GET /api/v1/bookmarks
- View favorites
GET /api/v1/favourites
- Report account
POST /api/v1/reports
- View pinned accounts
GET /api/v1/endorsements
- View preferences
GET /api/v1/preferences
- View followed tags
GET /api/v1/followed_tags
- Domain blocks
- View
GET /api/v1/domain_blocks
- Block
POST /api/v1/domain_blocks
- Unblock
DELETE /api/v1/domain_blocks
- View
- Server side filters
- List
GET /api/v2/filters
- View
GET /api/v2/filters/:id
- Create
POST /api/v2/filters
- Update
PUT /api/v2/filters/:id
- Delete
DELETE /api/v2/filters/:id
- List keywords
GET /api/v2/filters/:id/keywords
- View keyword
GET /api/v2/filters/:filter_id/keywords/:id
- Add keyword
POST /api/v2/filters/:filter_id/keywords
- Edit keyword
PUT /api/v2/filters/keywords/:id
- Delete keyword
DELETE /api/v2/filters/keywords/:id
- List
- Client side filters
- List
GET /api/v1/filters
- View
GET /api/v1/filters/:id
- Create
POST /api/v1/filters
- Update
PUT /api/v1/filters/:id
- Delete
DELETE /api/v1/filters/:id
- List
- Follow requests
- Featured tags
- View
GET /api/v1/featured_tags
- Create
POST /api/v1/featured_tags
- Delete
DELETE /api/v1/featured_tags/:id
- Suggestions
GET /api/v1/featured_tags/suggestions
- View
- Follow suggestions
- Tags
- View
GET /api/v1/tags/:id
- Follow
POST /api/v1/tags/:id/follow
- Unfollow
POST /api/v1/tags/:id/unfollow
- View
- Register
- Statuses
- Publish
POST /api/v1/statuses
- View
GET /api/v1/statuses/:id
- Delete
DELETE /api/v1/statuses/:id
- View context
GET /api/v1/statuses/:id/context
- View who reblogged
GET /api/v1/statuses/:id/reblogged_by
- View who favorited
GET /api/v1/statuses/:id/favourited_by
- Favorite
POST /api/v1/statuses/:id/favourite
- Unfavorite
POST /api/v1/statuses/:id/unfavourite
- Repost
POST /api/v1/statuses/:id/reblog
- Delete repost
POST /api/v1/statuses/:id/unreblog
- Bookmark
POST /api/v1/statuses/:id/bookmark
- Delete bookmark
POST /api/v1/statuses/:id/unbookmark
- Mute conversation
POST /api/v1/statuses/:id/mute
- Umute conversation
POST /api/v1/statuses/:id/unmute
- Pin
POST /api/v1/statuses/:id/pin
- Unpin
POST /api/v1/statuses/:id/unpin
- Edit
PUT /api/v1/statuses/:id
- View edits
GET /api/v1/statuses/:id/history
- View source
GET /api/v1/statuses/:id/source
- Publish
With some more research, we do not actually need to implement this. This would be useful if we want to add support for connecting with a Mastodon/Pleroma client app in the future, but in order to showcase SolidStart, a lightweight PWA should be a much higher priority.