Add information about new APIs in 2.1

This commit is contained in:
Eugen Rochko 2017-12-13 15:12:12 +01:00 committed by GitHub
parent 00bc5fc15f
commit 4bb149c73f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 59 additions and 0 deletions

View File

@ -21,6 +21,7 @@ API overview
- [Search](#search) - [Search](#search)
- [Statuses](#statuses) - [Statuses](#statuses)
- [Timelines](#timelines) - [Timelines](#timelines)
- [Lists](#lists)
- [Entities](#entities) - [Entities](#entities)
- [Account](#account) - [Account](#account)
- [Application](#application) - [Application](#application)
@ -36,6 +37,7 @@ API overview
- [Results](#results) - [Results](#results)
- [Status](#status) - [Status](#status)
- [Tag](#tag) - [Tag](#tag)
- [List](#list)
___ ___
@ -576,6 +578,7 @@ Returns the target [Status](#status).
GET /api/v1/timelines/home GET /api/v1/timelines/home
GET /api/v1/timelines/public GET /api/v1/timelines/public
GET /api/v1/timelines/tag/:hashtag GET /api/v1/timelines/tag/:hashtag
GET /api/v1/timelines/list/:list_id
Query parameters: Query parameters:
@ -592,6 +595,54 @@ Returns an array of [Statuses](#status), most recent ones first.
Public and tag timelines do not require authentication. Public and tag timelines do not require authentication.
### Lists
#### Retrieving lists
GET /api/v1/lists
Returns at most 50 results without pagination.
#### Retrieving lists by membership
GET /api/v1/accounts/:id/lists
Returns at most 50 results without pagination.
#### Retrieving accounts in a list
GET /api/v1/lists/:id/accounts
Returns accounts in the list. If you specify `limit=0` in the query, all accounts will be returned without pagination. Otherwise, standard account pagination rules apply.
#### Retrieving, creating, updating, deleting a list
GET /api/v1/lists/:id
POST /api/v1/lists
PUT /api/v1/lists/:id
DELETE /api/v1/lists/:id
Form data:
| Field | Description | Optional |
| ---------------- | --------------------- | --------- |
| `title` | The title of the list | no |
> **Note:** There is a limit of 50 lists.
#### Adding/removing accounts to/from a list
POST /api/v1/lists/:id/accounts
DELETE /api/v1/lists/:id/accounts
Form data:
| Field | Description | Optional |
| ---------------- | ----------------------------------------- | --------- |
| `account_ids` | [Array](#parameter-types) of account IDs | no |
> **Note:** Only accounts already followed by the authenticated user can be added to a list.
___ ___
## Entities ## Entities
@ -617,6 +668,7 @@ ___
| `avatar_static` | URL to the avatar static image (gif) | no | | `avatar_static` | URL to the avatar static image (gif) | no |
| `header` | URL to the header image | no | | `header` | URL to the header image | no |
| `header_static` | URL to the header static image (gif) | no | | `header_static` | URL to the header static image (gif) | no |
| `moved_to_account` | If the owner decided to switch accounts, new account is in this attribute | yes |
### Application ### Application
@ -770,3 +822,10 @@ ___
| ------------------------ | -------------------------------------------- | -------- | | ------------------------ | -------------------------------------------- | -------- |
| `name` | The hashtag, not including the preceding `#` | no | | `name` | The hashtag, not including the preceding `#` | no |
| `url` | The URL of the hashtag | no | | `url` | The URL of the hashtag | no |
### List
| Attribute | Description | Nullable |
|-----------|-------------------|----------|
| `id` | ID of the list | no |
| `title` | Title of the list | no |