リクエストパラメータ
| パラメータ |
項目名 |
型 |
必須 |
説明 |
値の例 |
| user_id |
ユーザーID |
整数 |
○ |
ユーザーのID |
3 |
リクエスト例
http://localhost:6000/api/v1/users/3
レスポンス
| フィールド |
項目名 |
型 |
必須 |
説明 |
値の例 |
| id |
ID |
整数 |
○ |
ユーザーのID |
3 |
| name |
名前 |
文字列 |
○ |
ユーザーの名前(ニックネーム) |
"アンミカ" |
| domain |
ドメイン |
文字列 |
○ |
ユーザー固有のID |
"foobar" |
| description |
自己紹介文 |
文字列 |
○ |
ユーザーの自己紹介文 |
"白が200色わかる方" |
| follower_count |
いいね数(フォロワー数) |
整数 |
○ |
シェフのフォロワーの数 |
12 |
| recipe_count |
マイレシピ数 |
整数 |
○ |
ユーザーが投稿したレシピの数 |
34 |
| thumbnail |
サムネイル画像 |
文字列 |
○ |
シェフのサムネイル画像URL |
"<https://example.com>" |
| created_at |
作成日時 |
日時 |
○ |
シェフの作成日時 |
2023-6-16 10:45 |
| updated_at |
更新日時 |
日時 |
○ |
シェフの更新日時 |
2023-6-20 15:45 |
| external_links |
外部サイトリンク |
配列 |
× |
外部サイトのリンクたち |
[] |
| url |
url |
文字列 |
○ |
URL |
"<https://example.com>" |
| type |
サイト種別 |
文字列 |
○ |
インスタかTwitterかなど |
"Twitter" |
レスポンス例
{
"id": 3,
"name": "アンミカ",
"domain": "foobar",
"description": "白が200色わかる方",
"follower_count": 12,
"recipe_count": 34,
"thumbnail": "<https://example.com>",
"created_at": "2023-6-16 10:45",
"updated_at": "2023-6-20 15:45",
"external_links": [
{
"url": "<https://example.com>",
"type": "twitter",
}
]
}
仕様メモ
- 外部リンクの表示順は、YouTube→Instagram→TikTok→Twitter→Facebookの順番に表示。
先頭の二つのみアイコンを表示。
- user_type = user
- user_id=current_user.idの場合(マイページ)、非公開を含める
- 下書きは含まない