From 743db6e6849fca5d634b831a732880b1f3ee9c3f Mon Sep 17 00:00:00 2001 From: m1sk9 Date: Sat, 20 Jul 2024 22:20:54 +0900 Subject: [PATCH 1/2] docs: Fix `/list` endpoint docs --- src/endpoint/list.md | 6 ++++-- src/endpoint/notes.md | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/endpoint/list.md b/src/endpoint/list.md index ccebd33..97df2ba 100644 --- a/src/endpoint/list.md +++ b/src/endpoint/list.md @@ -1,8 +1,10 @@ +# リストAPI + ## `POST /lists/` リストを作成します -### 入力: +### 入力 - body: `application/json` @@ -11,7 +13,7 @@ | title | `string` | リストのタイトル | 1≤N≤100[文字] | | | public | `boolean` | デフォルト: `false` (非公開) 公開:  リストにアサインされたアカウントには通知が飛びます. 非公開: 通知は飛ばず、自分以外のアカウントからは見えません | | | -### 入力例: +### 入力例 ```json { diff --git a/src/endpoint/notes.md b/src/endpoint/notes.md index 6d870e9..c78a8e1 100644 --- a/src/endpoint/notes.md +++ b/src/endpoint/notes.md @@ -232,7 +232,7 @@ | blur | `string` | 添付ファイルが画像であるときのサムネイルの [blurhash](https://blurha.sh/) | | | | nsfw | `boolean` | ToDo | | | -### 入力例: +### 入力例 ```json { From 565b830521f97a3d93bb2ad0f6b177cfb274878c Mon Sep 17 00:00:00 2001 From: m1sk9 Date: Sat, 20 Jul 2024 22:25:11 +0900 Subject: [PATCH 2/2] docs: fix notion link --- src/endpoint/account.md | 8 ++++---- src/endpoint/drive.md | 20 ++++++++++---------- src/endpoint/notes.md | 24 ++++++++++++------------ 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/endpoint/account.md b/src/endpoint/account.md index c979ffa..1792ab0 100644 --- a/src/endpoint/account.md +++ b/src/endpoint/account.md @@ -517,10 +517,10 @@ body: `application/json` } ``` -| 項目名 | 型 | 制約/説明 | 文字数 | 例 | -| ------------------------------------------------------------------------- | -------- | ------------ | ------ | -- | -| autorization_token | `string` | 認証トークン | | | -| [Untitled](https://www.notion.so/74411becb886427fb512a32d523d6faf) を参照 | | | | | +| 項目名 | 型 | 制約/説明 | 文字数 | 例 | +| -------------------------- | -------- | ------------ | ------ | -- | +| autorization_token | `string` | 認証トークン | | | +| [共通](../model.md) を参照 | | | | | **`400 Bad Request`** diff --git a/src/endpoint/drive.md b/src/endpoint/drive.md index 94a0d67..5d17d1e 100644 --- a/src/endpoint/drive.md +++ b/src/endpoint/drive.md @@ -104,16 +104,16 @@ } ``` -| 項目名 | 型 | 説明 | 制約 | 例 | -| --------- | --------------------- | ------------------------------------------------------------------ | ------------- | -- | -| id | `snowflake` | ファイルのID | | | -| name | `string` | ファイル名 | 1≤N≤256[文字] | | -| author_id | `snowflake` | アップロードしたアカウントのID | | | -| hash | `string` | 画像のblurhash | | | -| mime | `string` | mimeタイプ | | | -| nsfw | `boolean` | [Untitled](https://www.notion.so/525158aa6a3c4af79b87bff62736f844) | | | -| url | `string` | 画像へのリンク | | | -| thumbnail | `string`, `undefined` | (利用可能な場合のみ) 縮小版のサムネイル画像 | | | +| 項目名 | 型 | 説明 | 制約 | 例 | +| --------- | --------------------- | ------------------------------------------- | ------------- | -- | +| id | `snowflake` | ファイルのID | | | +| name | `string` | ファイル名 | 1≤N≤256[文字] | | +| author_id | `snowflake` | アップロードしたアカウントのID | | | +| hash | `string` | 画像のblurhash | | | +| mime | `string` | mimeタイプ | | | +| nsfw | `boolean` | [NSFWフラグ](../endpoint.md#nsfwフラグ) | | | +| url | `string` | 画像へのリンク | | | +| thumbnail | `string`, `undefined` | (利用可能な場合のみ) 縮小版のサムネイル画像 | | | **`400 Bad Request`** diff --git a/src/endpoint/notes.md b/src/endpoint/notes.md index c78a8e1..5457752 100644 --- a/src/endpoint/notes.md +++ b/src/endpoint/notes.md @@ -14,13 +14,13 @@ - body: `application/json` -| 項目名 | 型 | 制約/説明 | 数制約 | 例 | -| ------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------ | ------------- | -- | -| content | `string` | 投稿本文添付ファイルが存在する場合は0文字を許容 | 1≤3000[文字] | | -| visibility | `string`, `undefined` | 投稿の公開範囲 デフォルト: `public` とり得る値: `public` `home` `followers`, `direct` | - | | -| attachment_file_ids | `Array, undefined` | 投稿の添付ファイルID 1つでもファイルが存在しない場合はエラー終了する | 0≤N≤16[個] | | -| cw_comment | `string` | CW時の注釈 [Untitled](https://www.notion.so/bb170e32e67142e79221de90c29c9cd4) 参照デフォルトは空文字列 | 0≤N≤256[文字] | | -| send_to | `snowflake`, `undefined` | ダイレクト投稿の宛先公開範囲が`direct`のときのみ指定可能 | | | +| 項目名 | 型 | 制約/説明 | 数制約 | 例 | +| ------------------- | ----------------------------- | ------------------------------------------------------------------------------------------ | ------------- | -- | +| content | `string` | 投稿本文添付ファイルが存在する場合は0文字を許容 | 1≤3000[文字] | | +| visibility | `string`, `undefined` | 投稿の公開範囲 デフォルト: `public` とり得る値: `public` `home` `followers`, `direct` | - | | +| attachment_file_ids | `Array, undefined` | 投稿の添付ファイルID 1つでもファイルが存在しない場合はエラー終了する | 0≤N≤16[個] | | +| cw_comment | `string` | CW時の注釈. [CW/CWフラグ](../endpoint.md#contentswarningcwフラグ) 参照デフォルトは空文字列 | 0≤N≤256[文字] | | +| send_to | `snowflake`, `undefined` | ダイレクト投稿の宛先公開範囲が`direct`のときのみ指定可能 | | | ### 入力例 @@ -502,11 +502,11 @@ NOTICE: 自分以外のノートを削除する場合はモデレータ以上の body: `application/json` -| 項目名 | 型 | 説明 | 例 | -| ------------------------------------------------------------------------------ | ------------------- | ------ | -- | -| emoji | `string` | 絵文字 | | -| 表記法は [共通](https://www.notion.so/74411becb886427fb512a32d523d6faf) を参照 | `<:alias:11938437>` | | | -| `🎉` | | | | +| 項目名 | 型 | 説明 | 例 | +| --------------------------------------------------------------- | ------------------- | ------ | -- | +| emoji | `string` | 絵文字 | | +| 表記法は [カスタム絵文字](../endpoint.md#カスタム絵文字) を参照 | `<:alias:11938437>` | | | +| `🎉` | | | | ### 入力例