Browse Source

Code now code

closed-social-v3
Kibigo! 7 years ago
parent
commit
5d65aa3bf9
1 changed files with 43 additions and 43 deletions
  1. +43
    -43
      docs/Using-the-API/API.md

+ 43
- 43
docs/Using-the-API/API.md View File

@ -74,31 +74,31 @@ ___
#### Fetching an account: #### Fetching an account:
**GET /api/v1/accounts/:id**
GET /api/v1/accounts/:id
Returns an [Account](#account). Returns an [Account](#account).
#### Getting the current user: #### Getting the current user:
**GET /api/v1/accounts/verify_credentials**
GET /api/v1/accounts/verify_credentials
Returns the authenticated user's [Account](#account). Returns the authenticated user's [Account](#account).
#### Getting an account's followers: #### Getting an account's followers:
**GET /api/v1/accounts/:id/followers**
GET /api/v1/accounts/:id/followers
Returns an array of [Accounts](#account). Returns an array of [Accounts](#account).
#### Getting who account is following: #### Getting who account is following:
**GET /api/v1/accounts/:id/following**
GET /api/v1/accounts/:id/following
Returns an array of [Accounts](#account). Returns an array of [Accounts](#account).
#### Getting an account's statuses: #### Getting an account's statuses:
**GET /api/v1/accounts/:id/statuses**
GET /api/v1/accounts/:id/statuses
Query parameters: Query parameters:
@ -109,28 +109,28 @@ Returns an array of [Statuses](#status).
#### Following/unfollowing an account: #### Following/unfollowing an account:
**GET /api/v1/accounts/:id/follow**<br>
**GET /api/v1/accounts/:id/unfollow**
GET /api/v1/accounts/:id/follow
GET /api/v1/accounts/:id/unfollow
Returns the target [Account](#account]. Returns the target [Account](#account].
#### Blocking/unblocking an account: #### Blocking/unblocking an account:
**GET /api/v1/accounts/:id/block**<br>
**GET /api/v1/accounts/:id/unblock**
GET /api/v1/accounts/:id/block
GET /api/v1/accounts/:id/unblock
Returns the target [Account](#account]. Returns the target [Account](#account].
#### Muting/unmuting an account: #### Muting/unmuting an account:
**GET /api/v1/accounts/:id/mute**<br>
**GET /api/v1/accounts/:id/unmute**
GET /api/v1/accounts/:id/mute
GET /api/v1/accounts/:id/unmute
Returns the target [Account](#account]. Returns the target [Account](#account].
#### Getting an account's relationships: #### Getting an account's relationships:
**GET /api/v1/accounts/relationships**
GET /api/v1/accounts/relationships
Query parameters: Query parameters:
@ -140,7 +140,7 @@ Returns an array of [Relationships](#relationships) of the current user to a lis
#### Searching for accounts: #### Searching for accounts:
**GET /api/v1/accounts/search**
GET /api/v1/accounts/search
Query parameters: Query parameters:
@ -154,7 +154,7 @@ Will lookup an account remotely if the search term is in the `username@domain` f
#### Registering an application: #### Registering an application:
**POST /api/v1/apps**
POST /api/v1/apps
Form data: Form data:
@ -172,7 +172,7 @@ These values should be requested in the app itself from the API for each new app
#### Fetching a user's blocks: #### Fetching a user's blocks:
**GET /api/v1/blocks**
GET /api/v1/blocks
Returns an array of [Accounts](#account) blocked by the authenticated user. Returns an array of [Accounts](#account) blocked by the authenticated user.
@ -180,7 +180,7 @@ Returns an array of [Accounts](#account) blocked by the authenticated user.
#### Fetching a user's favourites: #### Fetching a user's favourites:
**GET /api/v1/favourites**
GET /api/v1/favourites
Returns an array of [Statuses](#status) favourited by the authenticated user. Returns an array of [Statuses](#status) favourited by the authenticated user.
@ -188,14 +188,14 @@ Returns an array of [Statuses](#status) favourited by the authenticated user.
#### Fetching a list of follow requests: #### Fetching a list of follow requests:
**GET /api/v1/follow_requests**
GET /api/v1/follow_requests
Returns an array of [Accounts](#account) which have requested to follow the authenticated user. Returns an array of [Accounts](#account) which have requested to follow the authenticated user.
#### Authorizing or rejecting follow requests: #### Authorizing or rejecting follow requests:
**POST /api/v1/follow_requests/authorize**<br>
**POST /api/v1/follow_requests/reject**
POST /api/v1/follow_requests/authorize
POST /api/v1/follow_requests/reject
Form data: Form data:
@ -207,7 +207,7 @@ Returns an empty object.
#### Following a remote user: #### Following a remote user:
**POST /api/v1/follows**
POST /api/v1/follows
Form data: Form data:
@ -219,7 +219,7 @@ Returns the local representation of the followed account, as an [Account](#accou
#### Getting instance information: #### Getting instance information:
**GET /api/v1/instance**
GET /api/v1/instance
Returns the current [Instance](#instance). Returns the current [Instance](#instance).
Does not require authentication. Does not require authentication.
@ -228,7 +228,7 @@ Does not require authentication.
#### Uploading a media attachment: #### Uploading a media attachment:
**POST /api/v1/media**
POST /api/v1/media
Form data: Form data:
@ -240,7 +240,7 @@ Returns an [Attachment](#attachment) that can be used when creating a status.
#### Fetching a user's mutes: #### Fetching a user's mutes:
**GET /api/v1/mutes**
GET /api/v1/mutes
Returns an array of [Accounts](#account) muted by the authenticated user. Returns an array of [Accounts](#account) muted by the authenticated user.
@ -248,19 +248,19 @@ Returns an array of [Accounts](#account) muted by the authenticated user.
#### Fetching a user's notifications: #### Fetching a user's notifications:
**GET /api/v1/notifications**
GET /api/v1/notifications
Returns a list of [Notifications](#notification) for the authenticated user. Returns a list of [Notifications](#notification) for the authenticated user.
#### Getting a single notification: #### Getting a single notification:
**GET /api/v1/notifications/:id**
GET /api/v1/notifications/:id
Returns the [Notification](#notification). Returns the [Notification](#notification).
#### Clearing notifications: #### Clearing notifications:
**POST /api/v1/notifications/clear**
POST /api/v1/notifications/clear
Deletes all notifications from the Mastodon server for the authenticated user. Deletes all notifications from the Mastodon server for the authenticated user.
Returns an empty object. Returns an empty object.
@ -269,13 +269,13 @@ Returns an empty object.
#### Fetching a user's reports: #### Fetching a user's reports:
**GET /api/v1/reports**
GET /api/v1/reports
Returns a list of [Reports](#report) made by the authenticated user. Returns a list of [Reports](#report) made by the authenticated user.
#### Reporting a user: #### Reporting a user:
**POST /api/v1/reports**
POST /api/v1/reports
Form data: Form data:
@ -289,7 +289,7 @@ Returns the finished [Report](#report).
#### Searching for content: #### Searching for content:
**GET /api/v1/search**
GET /api/v1/search
Form data: Form data:
@ -304,32 +304,32 @@ Otherwise, it will do a local account and hashtag search.
#### Fetching a status: #### Fetching a status:
**GET /api/v1/statuses/:id**
GET /api/v1/statuses/:id
Returns a [Status](#status). Returns a [Status](#status).
#### Getting status context: #### Getting status context:
**GET /api/v1/statuses/:id/contexts**
GET /api/v1/statuses/:id/contexts
Returns a [Context](#context). Returns a [Context](#context).
#### Getting a status card: #### Getting a status card:
**GET /api/v1/statuses/:id/card**
GET /api/v1/statuses/:id/card
Returns a [Card](#card). Returns a [Card](#card).
#### Getting who reblogged/favourited a status: #### Getting who reblogged/favourited a status:
**GET /api/v1/statuses/:id/reblogged_by**<br>
**GET /api/v1/statuses/:id/favourited_by**
GET /api/v1/statuses/:id/reblogged_by
GET /api/v1/statuses/:id/favourited_by
Returns an array of [Accounts](#account). Returns an array of [Accounts](#account).
#### Posting a new status: #### Posting a new status:
**POST /api/v1/statuses**
POST /api/v1/statuses
Form data: Form data:
@ -344,21 +344,21 @@ Returns the new [Status](#status).
#### Deleting a status: #### Deleting a status:
**DELETE /api/v1/statuses/:id**
DELETE /api/v1/statuses/:id
Returns an empty object. Returns an empty object.
#### Reblogging/unreblogging a status: #### Reblogging/unreblogging a status:
**POST /api/vi/statuses/:id/reblog**
**POST /api/vi/statuses/:id/unreblog**
POST /api/vi/statuses/:id/reblog
POST /api/vi/statuses/:id/unreblog
Returns the target [Status](#status). Returns the target [Status](#status).
#### Favouriting/unfavouriting a status: #### Favouriting/unfavouriting a status:
**POST /api/vi/statuses/:id/favourite**
**POST /api/vi/statuses/:id/unfavourite**
POST /api/vi/statuses/:id/favourite
POST /api/vi/statuses/:id/unfavourite
Returns the target [Status](#status). Returns the target [Status](#status).
@ -366,9 +366,9 @@ Returns the target [Status](#status).
#### Retrieving a timeline: #### Retrieving a timeline:
**GET /api/v1/timelines/home**<br>
**GET /api/v1/timelines/public**<br>
**GET /api/v1/timelines/tag/:hashtag**
GET /api/v1/timelines/home
GET /api/v1/timelines/public
GET /api/v1/timelines/tag/:hashtag
Query parameters: Query parameters:

Loading…
Cancel
Save