Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
noellabo
docs
Commits
320d51a4
Commit
320d51a4
authored
Oct 05, 2018
by
Eugen Rochko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve API documentation
parent
b2023264
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
17 deletions
+32
-17
entities.md
content/en/api/entities.md
+11
-3
accounts.md
content/en/api/rest/accounts.md
+6
-3
notifications.md
content/en/api/rest/notifications.md
+1
-0
timelines.md
content/en/api/rest/timelines.md
+7
-3
streaming.md
content/en/api/streaming.md
+7
-8
No files found.
content/en/api/entities.md
View file @
320d51a4
...
...
@@ -44,6 +44,16 @@ menu:
|
`value`
| String (HTML) |{{
<
no
>
}}|2.4.0|
|
`verified_at`
| String (Datetime) |{{
<
yes
>
}}|2.6.0|
### Source
|Attribute|Type|Nullable|Added in|
|---------|-----------|:------:|:------:|
|
`privacy`
| String |{{
<
yes
>
}}|1.5.0|
|
`sensitive`
| Boolean |{{
<
yes
>
}}|1.5.0|
|
`language`
| String (ISO6391) |{{
<
yes
>
}}|2.4.2|
|
`note`
| String |{{
<
no
>
}}|1.5.0|
|
`fields`
| Array of Hash |{{
<
no
>
}}|2.4.0|
## Application
|Attribute|Type|Nullable|Added in|
...
...
@@ -251,9 +261,7 @@ Please check `app/javascript/mastodon/selectors/index.js` and `app/lib/feed_mana
|---------|-----------|:------:|:------:|
|
`accounts`
| Array of
[
Account
](
#account
)
|{{
<
no
>
}}|1.1.0|
|
`statuses`
| Array of
[
Status
](
#status
)
|{{
<
no
>
}}|1.1.0|
|
`hashtags`
| Array of String |{{
<
no
>
}}|1.1.0|
> **Note:** The v2 API returns an array of [Tag](#tag) for the `hashtags` attribute.
|
`hashtags`
| Array of
[
Tag
](
#tag
)
|{{
<
no
>
}}|1.1.0|
## Status
...
...
content/en/api/rest/accounts.md
View file @
320d51a4
...
...
@@ -18,7 +18,7 @@ Returns [Account]({{< relref "entities.md#account" >}})
User's own account.
Returns
[
Account
](
{{
<
relref
"
entities
.
md
#
account
"
>
}}) with an extra
`source`
attribute
.
Returns
[
Account
](
{{
<
relref
"
entities
.
md
#
account
"
>
}}) with an extra
[
`source` attribute
](
{{
<
relref
"
entities
.
md
#
source
"
>
}})
.
### Resource information
...
...
@@ -43,8 +43,10 @@ Returns [Account]({{< relref "entities.md#account" >}})
|
`avatar`
| Avatar encoded using
`multipart/form-data`
| Optional |
|
`header`
| Header image encoded using
`multipart/form-data`
| Optional |
|
`locked`
| Enable follow requests | Optional |
|
`source`
| Extra preferences | Optional |
|
`fields_attributes`
| Profile metadata | Optional |
|
`source[privacy]`
| Default post privacy preference | Optional |
|
`source[sensitive]`
| Whether to mark statuses as sensitive by default | Optional |
|
`source[language]`
| Override language on statuses by default (ISO6391) | Optional |
|
`fields_attributes`
| Profile metadata (max. 4) | Optional |
## GET /api/v1/accounts/:id/followers
...
...
@@ -105,6 +107,7 @@ Returns array of [Status]({{< relref "entities.md#status" >}})
|
`exclude_replies`
| Skip statuses that reply to other statuses | Optional |false|
|
`max_id`
| Return results older than ID | Optional ||
|
`since_id`
| Return results newer than ID | Optional ||
|
`min_id`
| Return results immediately newer than ID | Optional ||
|
`limit`
| Maximum number of results | Optional | 20 |
### Pagination
...
...
content/en/api/rest/notifications.md
View file @
320d51a4
...
...
@@ -22,6 +22,7 @@ Returns array of [Notification]({{< relref "entities.md#notification" >}})
|----|-----------|:------:|:-----:|
|
`max_id`
| Return results older than ID | Optional ||
|
`since_id`
| Return results newer than ID | Optional ||
|
`min_id`
| Return results immediately newer than ID | Optional ||
|
`limit`
| Maximum number of results | Optional | 20 |
|
`exclude_types`
| Array of types to exclude (e.g.
`follow`
,
`favourite`
,
`reblog`
,
`mention`
) | Optional ||
...
...
content/en/api/rest/timelines.md
View file @
320d51a4
...
...
@@ -22,6 +22,7 @@ Returns array of [Status]({{< relref "entities.md#status" >}})
|----|-----------|:------:|:-----:|
|
`max_id`
| Return results older than ID | Optional ||
|
`since_id`
| Return results newer than ID | Optional ||
|
`min_id`
| Return results immediately newer than ID | Optional ||
|
`limit`
| Maximum number of results | Optional | 20 |
### Pagination
...
...
@@ -46,6 +47,7 @@ Returns array of [Status]({{< relref "entities.md#status" >}})
|
`only_media`
| Only statuses with media attachments | Optional |false|
|
`max_id`
| Return results older than ID | Optional ||
|
`since_id`
| Return results newer than ID | Optional ||
|
`min_id`
| Return results immediately newer than ID | Optional ||
|
`limit`
| Maximum number of results | Optional | 20 |
### Pagination
...
...
@@ -70,6 +72,7 @@ Returns array of [Status]({{< relref "entities.md#status" >}})
|
`only_media`
| Only statuses with media attachments | Optional |false|
|
`max_id`
| Return results older than ID | Optional ||
|
`since_id`
| Return results newer than ID | Optional ||
|
`min_id`
| Return results immediately newer than ID | Optional ||
|
`limit`
| Maximum number of results | Optional | 20 |
### Pagination
...
...
@@ -90,9 +93,10 @@ Returns array of [Status]({{< relref "entities.md#status" >}})
|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 |
|
`max_id`
| Return results older than ID | Optional ||
|
`since_id`
| Return results newer than ID | Optional ||
|
`min_id`
| Return results immediately newer than ID | Optional ||
|
`limit`
| Maximum number of results | Optional | 20 |
### Pagination
...
...
content/en/api/streaming.md
View file @
320d51a4
...
...
@@ -13,32 +13,31 @@ Alternatively, a WebSocket connection can also be established.
## Server-sent events (HTTP)
### Endpoints
GET /api/v1/streaming/user
#### GET /api/v1/streaming/user
Returns events that are relevant to the authorized user, i.e. home timeline and notifications
GET /api/v1/streaming/public
####
GET /api/v1/streaming/public
Returns all public statuses
GET /api/v1/streaming/public/local
####
GET /api/v1/streaming/public/local
Returns all local statuses
GET /api/v1/streaming/hashtag?tag={id}
#### GET /api/v1/streaming/hashtag?tag=:hashtag
Returns all public statuses for a particular hashtag
GET /api/v1/streaming/hashtag/local?tag={id}
#### GET /api/v1/streaming/hashtag/local?tag=:hashtag
Returns all local statuses for a particular hashtag
GET /api/v1/streaming/list?list={id}
#### GET /api/v1/streaming/list?list=:list_id
Returns statuses for a list
GET /api/v1/streaming/direct
####
GET /api/v1/streaming/direct
Returns all direct messages
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment