名言 API
プログラミング、モチベーション、知恵、ユーモア、デザインのカテゴリの読み取り専用の名言。
あなたのアカウントでこれらのエンドポイントが使えます。各エンドポイントのページの Try it でリクエストを送れます。
- GET
https://api.testingapis.com/api/QuotesList quotes with filtering, sorting, search and paginationList quotes with filtering, sorting, search and pagination. - GET
https://api.testingapis.com/api/Quotes/{id}Get a quote by IDGet a quote by ID. - GET
https://api.testingapis.com/api/Quotes/randomGet a random quoteGet a random quote.
リクエストの例
List quotes with filtering, sorting, search and pagination. 完全なリファレンスと Send ボタン(英語).
cURL
curl -X GET "https://api.testingapis.com/api/Quotes?limit=2"レスポンス · 200 OK
[
{
"id": 1,
"text": "First, solve the problem. Then, write the code.",
"author": "John Johnson",
"category": "programming"
},
{
"id": 2,
"text": "Code is like humor. When you have to explain it, it's bad.",
"author": "Cory House",
"category": "programming"
… (2 more lines)サインインして詳細を見る
これらのエンドポイントのパラメータ、リクエストとレスポンスの例、ライブの Try it パネルは、サインインしたメンバー向けです。アカウントは無料で、数秒で作成できます。
絞り込み、並べ替え、ページネーション
一覧エンドポイントは limit、page、offset、sort、order、q を受け付け、任意のフィールド名を完全一致の絞り込みに使えます。件数は X-Total-Count ヘッダーで返ります。書き込みはサーバーを再起動するまでメモリに残るので、テストで自由にレコードを作成・変更・削除できます。 クエリパラメータのリファレンス.