-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
返り値について
基本形
{
"status": "success" | "failure" // リクエストの成否
}
status
がsuccess
の時
{
"status": "success",
"data": リクエストの返り値 // 要参照: 各種エンドポイント
}
status
がfailure
の時
{
"status": "failure",
"error": Error // リクエストにて発生したエラー
}
エンドポイント一覧
/api/info
(GET
)
- 概要 … Botの情報を返す
- 返り値 … Botの情報
{ "version": String, // TrainInfo_Botのバージョン "account": { // Botのアカウント情報 "id": String, // アカウントのID "acct": String, // アカウントのユーザー名 "display_name": String, // アカウントの表示名 "url": String // アカウントのURL } }
/api/list
(GET
)
- 概要 … 発表中の鉄道運行情報の一覧を返す
- パラメータ
simple
… 詳細情報を含まない (Boolean
型)
- 返り値 … 鉄道運行情報の一覧 (
Operation[]
型)
/api/operation
(GET
)
- 概要 … 指定された鉄道の運行情報を返す
- パラメータ
- (Required)
name
… 鉄道名 (String
型)
- (Required)
- 返り値 … 鉄道の運行情報 (
Operation
型)
エンティティ一覧
Operation
{
"name": String, // 鉄道名
"status": "平常運転" | "運転見合わせ" | "運転再開見込" | "運転再開" | "遅延" | "一部運休" | "直通運転中止" | "折返し運転" | "お知らせ" | String, // 運行状況
"detail": String | null, // 運行情報の詳細
"createdAt": String | null // 発表日時 (YYYY/MM/DD hh:mm)
}
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation