Commit Graph

26 Commits (3f1f3d0827969a7bc46c3f905cf6a65b9eed621e)

Author SHA1 Message Date
Eugen Rochko 1f5792c834 API now respects ?limit param as long as it's within 2x default limit
Eugen Rochko a1894786cf Potentially fix notifications issue
Eugen Rochko 2d2154ba75 Add "locked" flag to accounts, prevent blocked users from following, force-unfollow blocked users
Eugen Rochko 4495baf451 X-RateLimit-Reset formatted with iso8601
Eugen Rochko 4bdb6a0eaf Rename "publish" to "toot" in english locale, fix lightbox showing old image
before loading new one, cache notifications API, fix missing follow button
on public profiles
Eugen Rochko 5c78547198 More query optimizations
Eugen Rochko 627a85f4e4 Better error message in doorkeeper json response
Eugen Rochko f88ca4a206 Performance improvement for notifications API
Eugen Rochko fdc17bea58 Fix rubocop issues, introduce usage of frozen literal to improve performance
Eugen Rochko 448ab18a20 Replace setting custom CORS headers with rack-cors, set it on /oauth/token endpoint
Eugen Rochko b13e7dda1f API pagination for all collections using Link header
Eugen Rochko 9aecc0f48a Move timelines API from statuses to its own controller, add a check for
resources that require a user context vs those that don't (such as public timeline)

/api/v1/statuses/public   -> /api/v1/timelines/public
/api/v1/statuses/home     -> /api/v1/timelines/home
/api/v1/statuses/mentions -> /api/v1/timelines/mentions
/api/v1/statuses/tag/:tag -> /api/v1/timelines/tag/:tag
Eugen Rochko 9467b900a2 Make cookies https-only if LOCAL_HTTPS is true, set X-Frame-Options to DENY,
add permissive CORS to API controllers
Eugen Rochko a9e40a3d80 Adding OAuth access scopes, fixing OAuth authorization UI, adding rate limiting
to the API
Eugen Rochko 04bbc57690 Fix - Add "back" button to certain views
Also fix reloading of timelines after merge-type events
Eugen Rochko de1f3aab86 Fix - Optimize n+1 queries when checking reblogged/favourited values for status lists in API
Eugen Rochko fe77921e47 Catching more exceptions that slipped through, removing AR logging from
production as it's very verbose and not very useful
Eugen Rochko 96ad9b0db1 Meaningful validation errors in API response
Eugen Rochko 7e14eefc81 Replace logo, fix - delete/unreblog/unfavourite API, fix - app
registration API
Eugen Rochko 0e9c1a297a Improved error handling for FollowRemoteService
Eugen Rochko 92afd29650 The frontend will now be an OAuth app, auto-authorized. The frontend will use an access token for API requests
Adding better errors for the API controllers, posting a simple status works from the frontend now
Eugen Rochko 10ba09f546 Upgrade to Rails 5.0.0.1
Eugen Rochko b640f35621 Writing out more tests, fixed some bugs
Eugen Rochko 447cfef62d Improving feed queries, switching API to doorkeeper authentication
Eugen Rochko ab6696e855 Adding doorkeeper, adding a REST API
POST /api/statuses                  Params: status (text contents), in_reply_to_id (optional)
GET  /api/statuses/:id
POST /api/statuses/:id/reblog

GET  /api/accounts/:id
GET  /api/accounts/:id/following
GET  /api/accounts/:id/followers
POST /api/accounts/:id/follow
POST /api/accounts/:id/unfollow

POST /api/follows                  Params: uri (e.g. user@domain)

OAuth authentication is currently disabled, but the API can be used with HTTP Auth.
Eugen Rochko 3b4e04dc32 Fixing some bugs, adding pending test examples