Documentation Index
Fetch the complete documentation index at: https://generaltranslation.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
このガイドでは、Spaces lookup エンドポイントを使用して Space に関する情報を取得する方法を説明します。
特定の Space の詳細を取得します:
curl "https://api.x.com/2/spaces/1DXxyRYNejbKM?\
space.fields=title,host_ids,participant_count,scheduled_start,state,created_at" \
-H "Authorization: Bearer $BEARER_TOKEN"
{
"data": {
"id": "1DXxyRYNejbKM",
"state": "live",
"title": "AIと未来について議論する",
"host_ids": ["2244994945"],
"participant_count": 245,
"created_at": "2024-01-15T09:00:00.000Z"
}
}
複数のSpaceをまとめて取得します。
curl "https://api.x.com/2/spaces?\
ids=1DXxyRYNejbKM,1YqJDqWYNQDGW&\
space.fields=title,state,participant_count" \
-H "Authorization: Bearer $BEARER_TOKEN"
特定のユーザーがホストしている Spaces を取得します。
curl "https://api.x.com/2/spaces/by/creator_ids?\
user_ids=2244994945,783214&\
space.fields=title,state,scheduled_start" \
-H "Authorization: Bearer $BEARER_TOKEN"
ホストユーザーのデータを展開します:
curl "https://api.x.com/2/spaces/1DXxyRYNejbKM?\
space.fields=title,host_ids,state&\
expansions=host_ids&\
user.fields=username,verified" \
-H "Authorization: Bearer $BEARER_TOKEN"
{
"data": {
"id": "1DXxyRYNejbKM",
"state": "live",
"title": "Discussing AI and the Future",
"host_ids": ["2244994945"]
},
"includes": {
"users": [
{
"id": "2244994945",
"username": "XDevelopers",
"verified": true
}
]
}
}
| State | 説明 |
|---|
live | 現在ライブ中 |
scheduled | 開始予定 |
ended | 終了済み |
| Field | Description |
|---|
title | Space のタイトル |
host_ids | ホストユーザーの ID |
speaker_ids | スピーカーユーザーの ID |
participant_count | 現在の参加者数 |
scheduled_start | 予定開始時刻 |
started_at | 実際の開始時刻 |
ended_at | 終了時刻 |
is_ticketed | Space がチケット制かどうか |
state | 現在の状態 |
Spaces を検索
キーワードで Spaces を検索
APIリファレンス
エンドポイントの完全なドキュメント