Add documentation about timelines API
This commit is contained in:
parent
26b881d665
commit
cb9ed818f6
|
@ -5,3 +5,87 @@ menu:
|
|||
parent: api
|
||||
weight: 10
|
||||
---
|
||||
|
||||
## GET /api/v1/timelines/home
|
||||
|
||||
Returns array of [Status]({{< relref "entities.md#status" >}})
|
||||
|
||||
### Resource information
|
||||
|
||||
{{< api_method_info auth="Yes" user="Yes" scope="read read:statuses" version="0.0.0" >}}
|
||||
|
||||
### Parameters
|
||||
|
||||
|Name|Description|Required|Default|
|
||||
|----|-----------|:------:|:-----:|
|
||||
| `max_id` | Return results older than ID | Optional ||
|
||||
| `since_id` | Return results newer than ID | Optional ||
|
||||
| `limit` | Maximum number of results | Optional | 20 |
|
||||
|
||||
### Pagination
|
||||
|
||||
{{< api_dynamic_pagination >}}
|
||||
|
||||
## GET /api/v1/timelines/public
|
||||
|
||||
Returns array of [Status]({{< relref "entities.md#status" >}})
|
||||
|
||||
### Resource information
|
||||
|
||||
{{< api_method_info auth="No" user="No" scope="read read:statuses" version="0.0.0" >}}
|
||||
|
||||
### Parameters
|
||||
|
||||
|Name|Description|Required|Default|
|
||||
|----|-----------|:------:|:-----:|
|
||||
| `local` | Only local statuses | Optional ||
|
||||
| `only_media` | Only statuses with media attachments | Optional ||
|
||||
| `max_id` | Return results older than ID | Optional ||
|
||||
| `since_id` | Return results newer than ID | Optional ||
|
||||
| `limit` | Maximum number of results | Optional | 20 |
|
||||
|
||||
### Pagination
|
||||
|
||||
{{< api_dynamic_pagination >}}
|
||||
|
||||
## GET /api/v1/timelines/tag/:hashtag
|
||||
|
||||
Returns array of [Status]({{< relref "entities.md#status" >}})
|
||||
|
||||
### Resource information
|
||||
|
||||
{{< api_method_info auth="No" user="No" scope="read read:statuses" version="0.0.0" >}}
|
||||
|
||||
### Parameters
|
||||
|
||||
|Name|Description|Required|Default|
|
||||
|----|-----------|:------:|:-----:|
|
||||
| `local` | Only local statuses | Optional ||
|
||||
| `only_media` | Only statuses with media attachments | Optional ||
|
||||
| `max_id` | Return results older than ID | Optional ||
|
||||
| `since_id` | Return results newer than ID | Optional ||
|
||||
| `limit` | Maximum number of results | Optional | 20 |
|
||||
|
||||
### Pagination
|
||||
|
||||
{{< api_dynamic_pagination >}}
|
||||
|
||||
## GET /api/v1/timelines/list/:list_id
|
||||
|
||||
Returns array of [Status]({{< relref "entities.md#status" >}})
|
||||
|
||||
### Resource information
|
||||
|
||||
{{< api_method_info auth="Yes" user="Yes" scope="read read:statuses" version="0.0.0" >}}
|
||||
|
||||
### Parameters
|
||||
|
||||
|Name|Description|Required|Default|
|
||||
|----|-----------|:------:|:-----:|
|
||||
| `max_id` | Get a list of statuses with ID less than this value | Optional ||
|
||||
| `since_id` | Get a list of statuses with ID greater than this value | Optional ||
|
||||
| `limit` | Maximum number of statuses to return | Optional | 20 |
|
||||
|
||||
### Pagination
|
||||
|
||||
{{< api_dynamic_pagination >}}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<p>This API returns Link headers containing links to the next and previous page. However, the links can also be constructed dynamically using query params.</p>
|
|
@ -0,0 +1,28 @@
|
|||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th style="text-align: left">Response format</th>
|
||||
<td>JSON</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th style="text-align: left">Requires authentication</th>
|
||||
<td>{{ .Get "auth" }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th style="text-align: left">Requires user</th>
|
||||
<td>{{ .Get "user" }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th style="text-align: left">Scope</th>
|
||||
<td><code>{{ .Get "scope" }}</code></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th style="text-align: left">Available since</th>
|
||||
<td>{{ .Get "version" }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
|
@ -0,0 +1 @@
|
|||
<p>This API returns Link headers containing links to the next and previous page. Since it is using an internal ID, <strong>it is impossible to dynamically generate query parameters to paginate</strong>. You must rely on the Link header.</p>
|
Loading…
Reference in New Issue