Stream sampled tweets in real time
x.x.stream-posts-sampleStream sampled Posts
- Price
- $0.005/resultプロバイダー原価
- Success rate
- —成功率データはまだありませんLast 30 days · 0 calls
- Latency p50
- ——
- Last verified
- —Not verified yet
GEThttps://toolswitch.dev/v1/tools/x.x.stream-posts-samplePreview- Uses platform quota
- Synchronous response
- Reads public data
パラメータ
| パラメータ | 型 | 必須 | 説明 | 例 |
|---|---|---|---|---|
| クエリパラメータ | ||||
expansions | 配列 | 任意 | A comma separated list of fields to expand. | |
poll.fields | 配列 | 任意 | A comma separated list of Poll fields to display. | |
user.fields | 配列 | 任意 | A comma separated list of User fields to display. | |
media.fields | 配列 | 任意 | A comma separated list of Media fields to display. | |
place.fields | 配列 | 任意 | A comma separated list of Place fields to display. | |
tweet.fields | 配列 | 任意 | A comma separated list of Tweet fields to display. | |
backfill_minutes | 整数 | 任意 | The number of minutes of backfill requested. | |
- クエリパラメータ
expansions配列任意A comma separated list of fields to expand.
poll.fields配列任意A comma separated list of Poll fields to display.
user.fields配列任意A comma separated list of User fields to display.
media.fields配列任意A comma separated list of Media fields to display.
place.fields配列任意A comma separated list of Place fields to display.
tweet.fields配列任意A comma separated list of Tweet fields to display.
backfill_minutes整数任意The number of minutes of backfill requested.
コード例
$TOOLSWITCH_KEY をコンソールで作成したキーに置き換えてください。
Preview
curl -X GET 'https://toolswitch.dev/v1/tools/x.x.stream-posts-sample' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/x.x.stream-posts-sample",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/x.x.stream-posts-sample", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());このゲートウェイ API はプレビュー版です。URL や認証方式は変更される場合があります。 パラメータはサンプルデータです。 呼び出し料金は $0.005/result です。サービス料を含みます。