API - PIETEP/mebius GitHub Wiki
-
カード
- カード追加
- カード削除
-
デッキ
- デッキ登録
- カードをadd
- カードを削除
- デッキを削除
-
検索クエリ
- カード名を入力(1枚以上)
- 星を入れる
- searchボタンを押す
- カード
GET /api/v1/cards
POST /api/v1/cards
GET /api/v1/cards/{:id}
DELETE /api/v1/cards/{:id}
- デッキ
GET /api/v1/decks
POST /api/v1/decks
GET /api/v1/decks/{:id}
PUT /api/v1/decks/{:id}
DELETE /api/v1/decks/{:id}
- 検索クエリ
GET /api/v1/search
GET /api/v1/suggest
Query Parameter
Response JSON
{
"cards": [{
"id": 0,
"name": "ドラゴンナイト",
"point": 4,
"species0": "dragon",
"species1": "human",
"job": "Knight"
}, {
"id": 1,
"name": "デストロイヤー",
"point": 5,
"species0": "Goblin",
"species1": null,
"job": "Mechanic"
}]
}
Request JSON
{
"name": "ドラゴンナイト",
"point": 4,
"species0": "dragon",
"species1": "human",
"job": "Knight"
}
Successful Response JSON
- Status Code: 200
{
"id": 0,
"name": "ドラゴンナイト",
"point": 4,
"species0": "dragon",
"species1": "human",
"job": "Knight"
}
Failure Response JSON
- Status Code: 400
{
"message": "おーい"
}
Query Parameter
Response JSON
{
"id": 0,
"name": "ドラゴンナイト",
"point": 4,
"species0": "dragon",
"species1": "human",
"job": "Knight"
}
Query Parameter
Successful Response JSON
{
"name": "ドラゴンナイト",
"point": 4,
"species0": "dragon",
"species1": "human",
"job": "Knight"
}
Failure Response JSON
- Status Code: 400
{
"message": "失敗したで"
}
Query Parameter
Response JSON
{
"decks": [{
"id": 0,
"name": "Dragon",
"cards": [{
"id": 0,
"name": "ドラゴンナイト",
"point": 4,
"species0": "dragon",
"species1": "human",
"job": "Knight"
}, {
"id": 1,
"name": "デストロイヤー",
"point": 5,
"species0": "Goblin",
"species1": null,
"job": "Mechanic"
}],
"creator": "Yuta"
}, {
"id": 1,
"name": "Goblin",
"cards": [{
"id": 0,
"name": "ドラゴンナイト",
"point": 4,
"species0": "dragon",
"species1": "human",
"job": "Knight"
}, {
"id": 1,
"name": "デストロイヤー",
"point": 5,
"species0": "Goblin",
"species1": null,
"job": "Mechanic"
}],
"creator": "Yuya"
}]
}
Request JSON
{
"name": null,
"cards": [{
"id": 0,
"name": "ドラゴンナイト",
"point": 4,
"species0": "dragon",
"species1": "human",
"job": "Knight"
}, {
"id": 1,
"name": "デストロイヤー",
"point": 5,
"species0": "Goblin",
"species1": null,
"job": "Mechanic"
}],
"creator": "Yuta"
}
Successful Response JSON
- Status Code: 200
{
"id": 0,
"name": "Deck0",
"cards": [{
"id": 0,
"name": "ドラゴンナイト",
"point": 4,
"species0": "dragon",
"species1": "human",
"job": "Knight"
}, {
"id": 1,
"name": "デストロイヤー",
"point": 5,
"species0": "Goblin",
"species1": null,
"job": "Mechanic"
}],
"creator": "Yuta"
}
Failure Response JSON
- Status Code: 400
{
"message": "おーい"
}
Response JSON
{
"id": 0,
"name": "Deck0",
"cards": [{
"id": 0,
"name": "ドラゴンナイト",
"point": 4,
"species0": "dragon",
"species1": "human",
"job": "Knight"
}, {
"id": 1,
"name": "デストロイヤー",
"point": 5,
"species0": "Goblin",
"species1": null,
"job": "Mechanic"
}],
"creator": "Yuta"
}
Request JSON
{
"id": 0,
"name": "元々付いてる名前",
"cards": [{
"id": 0,
"name": "ドラゴンナイト",
"point": 4,
"species0": "dragon",
"species1": "human",
"job": "Knight"
}, {
"id": 1,
"name": "デストロイヤー",
"point": 5,
"species0": "Goblin",
"species1": null,
"job": "Mechanic"
}],
"creator": "Yuta"
}
Response JSON
{
"id": 0,
"name": "Deck0",
"cards": [{
"id": 0,
"name": "ドラゴンナイト",
"point": 4,
"species0": "dragon",
"species1": "human",
"job": "Knight"
}, {
"id": 1,
"name": "デストロイヤー",
"point": 5,
"species0": "Goblin",
"species1": null,
"job": "Mechanic"
}],
"creator": "Yuta"
}
Successful Response JSON
{
"name": "Deck0",
"cards": [{
"id": 0,
"name": "ドラゴンナイト",
"point": 4,
"species0": "dragon",
"species1": "human",
"job": "Knight"
}, {
"id": 1,
"name": "デストロイヤー",
"point": 5,
"species0": "Goblin",
"species1": null,
"job": "Mechanic"
}],
"creator": "Yuta"
}
Failure Response JSON
- Status Code: 400
{
"message": "失敗したで"
}
Query Parameter
- q: 検索ワード
- star: 星の数
Response JSON
{
"scores": [{
"point": 100,
"deck": {
"id": 0,
"name": "",
"url": "http://<domain>/deck/0"
}
}, {
"point": 90,
"deck": {
"id": 1,
"name": "",
"url": "http://<domain>/deck/1"
}
}, {
"point": 80,
"deck": {
"id": 2,
"name": "",
"url": "http://<domain>/deck/2"
}
},]
}
Query Parameter
- q: 検索ワード
Response JSON
{
"words": [
"ドラゴンナイト",
"ドラゴンなんちゃら",
"ドラゴン強い子",
]
}