-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): define conversations (direct messages)
- Loading branch information
Showing
1 changed file
with
100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -196,3 +196,103 @@ | |
- `NOTHING_LEFT`: これ以上古い投稿はありません | ||
- 1つでも古い投稿がある場合は投稿を返します | ||
- `ACCOUNT_NOT_FOUND` : 指定したアカウントが見つかりませんでした | ||
|
||
## `GET /timeline/conversations` | ||
|
||
ダイレクト投稿を受け取った、もしくは送った相手を取得します. | ||
|
||
### 入力 | ||
|
||
なし | ||
|
||
### 出力 | ||
|
||
**`200 OK`** | ||
|
||
```json | ||
[ | ||
{ | ||
"account": { | ||
"accountId": "20983985", | ||
"accountName": "@[email protected]", | ||
"nickname": "John Doe", | ||
"avatar": "https://example.com/images/avatar.png" | ||
}, | ||
"updatedAt": "2023-09-10T00:00:00.000Z" | ||
} | ||
] | ||
``` | ||
|
||
## `GET /timeline/conversations/{account_id}` | ||
|
||
指定したアカウントとのダイレクト投稿を取得します. | ||
|
||
### 入力 | ||
|
||
- パスパラメータ | ||
- `account_id`: `snowflake` | ||
- ダイレクト投稿を取得したいアカウントID. | ||
- クエリパラメータ | ||
- `before_id`: `snowflake` | `undefined` | ||
- デフォルト: `undefined` | ||
- 指定したIDより古い投稿を返します.指定したIDの投稿は含まれません | ||
|
||
### 出力 | ||
|
||
**`200 OK`** | ||
|
||
タイムラインを取得します. | ||
|
||
```json | ||
[ | ||
{ | ||
"id": "3893974892", | ||
"content": "hello world!", | ||
"cw_comment": "", | ||
"visibility": "public", | ||
"created_at": "2023-09-27T14:17:29.169Z", | ||
"attachment_files": [ | ||
{ | ||
"id": "204980348583", | ||
"filename": "hello.png", | ||
"content_type": "image/png", | ||
"url": "https://example.com/images/hello.png", | ||
"blur": "eoig:woi!our@nj/d", | ||
"nsfw": false | ||
} | ||
], | ||
"reactions": [ | ||
{ | ||
"emoji": "<:alias:11938437>", | ||
"reacted_by": "3085763644" | ||
}, | ||
{ | ||
"emoji": "🎉", | ||
"reacted_by": "494984128" | ||
} | ||
], | ||
"author": { | ||
"id": "2874987398", | ||
"name": "@[email protected]", | ||
"display_name": "John Doe", | ||
"bio": "I am Test User.", | ||
"avatar": "https://example.com/images/avatar.png", | ||
"header": "https://example.com/images/header.png", | ||
"followed_count": 200, | ||
"following_count": 10 | ||
} | ||
} | ||
] | ||
``` | ||
|
||
**`404 Not Found`** | ||
|
||
```json | ||
{ | ||
"error": "TEST_ERROR_CODE" | ||
} | ||
``` | ||
|
||
- `NOTHING_LEFT`: これ以上古い投稿はありません | ||
- 1つでも古い投稿がある場合は投稿を返します | ||
- `ACCOUNT_NOT_FOUND` : 指定したアカウントが見つかりませんでした |