Info
Welcome to the generated API reference. Get Postman Collection
admin 管理者ページ
api/admin/groups
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/groups"
const url = new URL("http://127.0.0.1:8000/api/admin/groups");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/groups
api/admin/groups/{group}
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/groups/{group}"
const url = new URL("http://127.0.0.1:8000/api/admin/groups/{group}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/groups/{group}
api/admin/groups/{group}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/groups/{group}"
const url = new URL("http://127.0.0.1:8000/api/admin/groups/{group}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/groups/{group}
api/admin/sessions
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/sessions"
const url = new URL("http://127.0.0.1:8000/api/admin/sessions");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/sessions
api/admin/sessions/{session}
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/sessions/{session}"
const url = new URL("http://127.0.0.1:8000/api/admin/sessions/{session}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/sessions/{session}
api/admin/sessions/{session}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/sessions/{session}"
const url = new URL("http://127.0.0.1:8000/api/admin/sessions/{session}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/sessions/{session}
api/admin/users
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/users"
const url = new URL("http://127.0.0.1:8000/api/admin/users");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/users
api/admin/users/{user}
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/users/{user}"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/users/{user}
api/admin/users/{user}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/users/{user}"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/users/{user}
api/admin/attributes
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/attributes"
const url = new URL("http://127.0.0.1:8000/api/admin/attributes");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/attributes
api/admin/attributes/{attribute}
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/attributes/{attribute}"
const url = new URL("http://127.0.0.1:8000/api/admin/attributes/{attribute}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/attributes/{attribute}
api/admin/attributes/{attribute}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/attributes/{attribute}"
const url = new URL("http://127.0.0.1:8000/api/admin/attributes/{attribute}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/attributes/{attribute}
api/admin/default_settings
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/default_settings"
const url = new URL("http://127.0.0.1:8000/api/admin/default_settings");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/default_settings
api/admin/default_settings/{default_setting}
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/default_settings/{default_setting}"
const url = new URL("http://127.0.0.1:8000/api/admin/default_settings/{default_setting}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/default_settings/{default_setting}
api/admin/default_settings/{default_setting}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/default_settings/{default_setting}"
const url = new URL("http://127.0.0.1:8000/api/admin/default_settings/{default_setting}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/default_settings/{default_setting}
api/admin/users/{user}/groups
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/users/{user}/groups"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/groups");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/users/{user}/groups
api/admin/users/{user}/groups/{group}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/users/{user}/groups/{group}"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/groups/{group}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/users/{user}/groups/{group}
api/admin/users/{user}/sessions
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/users/{user}/sessions"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/sessions");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/users/{user}/sessions
api/admin/users/{user}/sessions/{session}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/users/{user}/sessions/{session}"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/sessions/{session}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/users/{user}/sessions/{session}
api/admin/users/{user}/attributes
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/users/{user}/attributes"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/attributes");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/users/{user}/attributes
api/admin/users/{user}/attributes/{attribute}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/users/{user}/attributes/{attribute}"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/attributes/{attribute}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/users/{user}/attributes/{attribute}
api/admin/users/{user}/default_settings
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/users/{user}/default_settings"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/default_settings");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/users/{user}/default_settings
api/admin/users/{user}/default_settings/{default_setting}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/users/{user}/default_settings/{default_setting}"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/default_settings/{default_setting}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/users/{user}/default_settings/{default_setting}
attribute 属性
attributes.index 自分が管理している属性一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/attributes"
const url = new URL("http://127.0.0.1:8000/api/attributes");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 31,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "先生",
"plus_minus": 5000,
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 32,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "同僚",
"plus_minus": 0,
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 33,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "同級生",
"plus_minus": 0,
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 34,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "女性",
"plus_minus": -500,
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 35,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "学生",
"plus_minus": -1000,
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
GET api/attributes
attributes.store 属性追加
Example request:
curl -X POST "http://127.0.0.1:8000/api/attributes" \
-H "Content-Type: application/json" \
-d '{"name":"XnXryuSW9c1TviDZ","plus_minus":17}'
const url = new URL("http://127.0.0.1:8000/api/attributes");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"name": "XnXryuSW9c1TviDZ",
"plus_minus": 17
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 37,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "attributenameBwdDO",
"plus_minus": null,
"created_at": {
"date": "2019-03-10 06:09:52.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:09:52.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
Example response (409):
{
"error": "同じ名前は使用できません"
}
HTTP Request
POST api/attributes
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | 属性名。必須 |
plus_minus | integer | optional | 加減算 |
attributes.show 属性の一つの詳細を得る
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/attributes/{attribute}"
const url = new URL("http://127.0.0.1:8000/api/attributes/{attribute}");
let params = {
"attribute": "cVqkkv2R4Gjpv8AT",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 32,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "同僚",
"plus_minus": 0,
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
GET api/attributes/{attribute}
Query Parameters
Parameter | Status | Description |
---|---|---|
attribute | required | 属性id |
attributes.update 対象の属性をアップデート
Example request:
curl -X PUT "http://127.0.0.1:8000/api/attributes/{attribute}" \
-H "Content-Type: application/json" \
-d '{"name":"VQLndhIYLVnnqqrM","plus_minus":11}'
const url = new URL("http://127.0.0.1:8000/api/attributes/{attribute}");
let params = {
"attribute": "NsFI1hwBa337Kk7Y",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"name": "VQLndhIYLVnnqqrM",
"plus_minus": 11
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 37,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "updatekCsLI",
"plus_minus": null,
"created_at": {
"date": "2019-03-10 06:09:52.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:09:52.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
PUT api/attributes/{attribute}
PATCH api/attributes/{attribute}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | 属性名。必須 |
plus_minus | integer | optional | 加減算 |
Query Parameters
Parameter | Status | Description |
---|---|---|
attribute | required | 属性id |
attributes.destory 属性の削除
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/attributes/{attribute}"
const url = new URL("http://127.0.0.1:8000/api/attributes/{attribute}");
let params = {
"attribute": "3IQNSTxzHMWsK7mL",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (204):
[]
HTTP Request
DELETE api/attributes/{attribute}
Query Parameters
Parameter | Status | Description |
---|---|---|
attribute | required | 属性id |
auth 認証
email, password, usernameでユーザー登録し、JWTを得る
Example request:
curl -X POST "http://127.0.0.1:8000/api/auth/register" \
-H "Content-Type: application/json" \
-d '{"email":"qK2KWU9IU5ZDavfu","username":"CFiYOoSU6CTu1xxc","password":"cyElUP90zIsuAle5"}'
const url = new URL("http://127.0.0.1:8000/api/auth/register");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"email": "qK2KWU9IU5ZDavfu",
"username": "CFiYOoSU6CTu1xxc",
"password": "cyElUP90zIsuAle5"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xMjcuMC4wLjE6ODAwMFwvYXBpXC9hdXRoXC9yZWdpc3RlciIsImlhdCI6MTU1MjE2NTc5NCwiZXhwIjoxNTUyMTY5Mzk0LCJuYmYiOjE1NTIxNjU3OTQsImp0aSI6IjNiODVaTlJmZHdwTlYzeGQiLCJzdWIiOjgsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.HMU9dv_fAYwBjdzcssxPjTw_UZGysyKw6iPdmBvWg7E",
"token_type": "bearer",
"expires_in": 3600
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"email": [
"The email must be a valid email address."
]
}
}
HTTP Request
POST api/auth/register
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
string | required | メールアドレス | |
username | string | required | ユーザーネーム(表示される名前) |
password | string | required | パスワード |
email, password でログインし、JWTを得る
Example request:
curl -X POST "http://127.0.0.1:8000/api/auth/login" \
-H "Content-Type: application/json" \
-d '{"email":"E1Nrgerm23X76pb4","password":"SimRheXIngHIMV4M"}'
const url = new URL("http://127.0.0.1:8000/api/auth/login");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"email": "E1Nrgerm23X76pb4",
"password": "SimRheXIngHIMV4M"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL2FwaVwvYXV0aFwvbG9naW4iLCJpYXQiOjE1NTIxMTc4MDYsImV4cCI6MTU1MjE1MzgwNiwibmJmIjoxNTUyMTE3ODA2LCJqdGkiOiJIU1o4djQ1RmpjSEFJTVJ2Iiwic3ViIjo4LCJwcnYiOiI4N2UwYWYxZWY5ZmQxNTgxMmZkZWM5NzE1M2ExNGUwYjA0NzU0NmFhIn0.dmqBg0qmSXoEDsU1VO78aEt0-UwsVxbDvvGCPeYHl3k",
"token_type": "bearer",
"expires_in": 36000
}
Example response (401):
{
"error": "Unauthorized"
}
HTTP Request
POST api/auth/login
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
string | required | メールアドレス | |
password | string | required | パスワード |
logout ログアウト
Example request:
curl -X POST "http://127.0.0.1:8000/api/auth/logout"
const url = new URL("http://127.0.0.1:8000/api/auth/logout");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"message": "Successfully logged out"
}
HTTP Request
POST api/auth/logout
refresh token トークンのリフレッシュ
Example request:
curl -X POST "http://127.0.0.1:8000/api/auth/refresh"
const url = new URL("http://127.0.0.1:8000/api/auth/refresh");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xMjcuMC4wLjE6ODAwMFwvYXBpXC9hdXRoXC9yZWZyZXNoIiwiaWF0IjoxNTUyMTY1Nzk1LCJleHAiOjE1NTIxNjkzOTUsIm5iZiI6MTU1MjE2NTc5NSwianRpIjoiQWptM3Nxc2tVVVZJcnJZdiIsInN1YiI6NywicHJ2IjoiODdlMGFmMWVmOWZkMTU4MTJmZGVjOTcxNTNhMTRlMGIwNDc1NDZhYSJ9.b1TP8esLLsk4Ylrn64QUKM76iYTqzDm50-uhWDAz9mk",
"token_type": "bearer",
"expires_in": 3600
}
HTTP Request
POST api/auth/refresh
me 現在ログインしているユーザーの情報を得る
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/auth/me"
const url = new URL("http://127.0.0.1:8000/api/auth/me");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 1,
"unique_id": "NbiAw6kteV",
"username": "浜田 太郎",
"email": "hamada@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-09 15:17:53.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-09 15:17:53.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
GET api/auth/me
api/admin/auth/register
Example request:
curl -X POST "http://127.0.0.1:8000/api/admin/auth/register"
const url = new URL("http://127.0.0.1:8000/api/admin/auth/register");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/admin/auth/register
email, password でログインし、JWTを得る
Example request:
curl -X POST "http://127.0.0.1:8000/api/admin/auth/login" \
-H "Content-Type: application/json" \
-d '{"email":"KG2pYFHpS6JRfsVb","password":"yYkXyRUX3XLB8eom"}'
const url = new URL("http://127.0.0.1:8000/api/admin/auth/login");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"email": "KG2pYFHpS6JRfsVb",
"password": "yYkXyRUX3XLB8eom"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3RcL2FwaVwvYXV0aFwvbG9naW4iLCJpYXQiOjE1NTIxMTc4MDYsImV4cCI6MTU1MjE1MzgwNiwibmJmIjoxNTUyMTE3ODA2LCJqdGkiOiJIU1o4djQ1RmpjSEFJTVJ2Iiwic3ViIjo4LCJwcnYiOiI4N2UwYWYxZWY5ZmQxNTgxMmZkZWM5NzE1M2ExNGUwYjA0NzU0NmFhIn0.dmqBg0qmSXoEDsU1VO78aEt0-UwsVxbDvvGCPeYHl3k",
"token_type": "bearer",
"expires_in": 36000
}
Example response (401):
{
"error": "Unauthorized"
}
HTTP Request
POST api/admin/auth/login
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
string | required | メールアドレス | |
password | string | required | パスワード |
default_settings デフォルト設定
default_settings.index デフォルト設定の一覧を取得する
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/default_settings"
const url = new URL("http://127.0.0.1:8000/api/default_settings");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 7,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "いつもの設定",
"current_location_flag": 1,
"longitude": null,
"latitude": null,
"timer": "00:01:00",
"group": {
"id": 7,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "いつもの",
"users": [
{
"id": 5,
"unique_id": "iCx6Vo11cd",
"name": null,
"username": "浜田 太郎(デモ)",
"email": "demo5@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
],
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
GET api/default_settings
default_settings.store 新規デフォルト設定を作成する
Example request:
curl -X POST "http://127.0.0.1:8000/api/default_settings" \
-H "Content-Type: application/json" \
-d '{"name":"J2SsTSEmDjnhMTF9","current_location_flag":true,"latitude":"qZZTrYukk83t1nF8","longitude":"ksMnxT8YU312sq9o","timer":5,"group_id":12}'
const url = new URL("http://127.0.0.1:8000/api/default_settings");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"name": "J2SsTSEmDjnhMTF9",
"current_location_flag": true,
"latitude": "qZZTrYukk83t1nF8",
"longitude": "ksMnxT8YU312sq9o",
"timer": 5,
"group_id": 12
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 8,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "DM8VCS",
"current_location_flag": 1,
"longitude": null,
"latitude": null,
"timer": "01:00:00",
"group": {
"id": 7,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "いつもの",
"users": [
{
"id": 5,
"unique_id": "iCx6Vo11cd",
"name": null,
"username": "浜田 太郎(デモ)",
"email": "demo5@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
],
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"created_at": {
"date": "2019-03-10 06:09:56.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:09:56.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
POST api/default_settings
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | 設定名 |
current_location_flag | boolean | optional | 現在地からなら、1を、そうでないなら0を入れる(デフォルトでは1が入る) |
latitude | string | optional | 緯度('35.71727401')みたいな数字 |
longitude | string | optional | 経度('140.00898606')みたいな数字 |
timer | integer | required | 始まるまでの時間'01:00:00'形式 |
group_id | integer | required | この設定を適用するグループid |
default_settings.show 一つのデフォルト設定の詳細を得る
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/default_settings/{default_setting}"
const url = new URL("http://127.0.0.1:8000/api/default_settings/{default_setting}");
let params = {
"default_setting": "ByevwOkuxqKUuw8w",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 8,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "DM8VCS",
"current_location_flag": 1,
"longitude": null,
"latitude": null,
"timer": "01:00:00",
"group": {
"id": 7,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "いつもの",
"users": [
{
"id": 5,
"unique_id": "iCx6Vo11cd",
"name": null,
"username": "浜田 太郎(デモ)",
"email": "demo5@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
],
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"created_at": {
"date": "2019-03-10 06:09:56.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:09:56.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
GET api/default_settings/{default_setting}
Query Parameters
Parameter | Status | Description |
---|---|---|
default_setting | required | 設定のid |
default_settings.update 一つのデフォルト設定情報のupdate
Example request:
curl -X PUT "http://127.0.0.1:8000/api/default_settings/{default_setting}" \
-H "Content-Type: application/json" \
-d '{"name":"EOuJBCAJJcC9bgpg","current_location_flag":true,"latitude":"0yYamFMjH7necjdz","longitude":"d2nzeCr2OsM5YqrS","timer":16,"group_id":19}'
const url = new URL("http://127.0.0.1:8000/api/default_settings/{default_setting}");
let params = {
"default_setting": "m9VmD5JwXoAjCh35",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"name": "EOuJBCAJJcC9bgpg",
"current_location_flag": true,
"latitude": "0yYamFMjH7necjdz",
"longitude": "d2nzeCr2OsM5YqrS",
"timer": 16,
"group_id": 19
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 8,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "newSettings9DOPLsmc",
"current_location_flag": 1,
"longitude": null,
"latitude": null,
"timer": "01:00:00",
"group": {
"id": 7,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "いつもの",
"users": [
{
"id": 5,
"unique_id": "iCx6Vo11cd",
"name": null,
"username": "浜田 太郎(デモ)",
"email": "demo5@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
],
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"created_at": {
"date": "2019-03-10 06:09:56.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:09:57.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
PUT api/default_settings/{default_setting}
PATCH api/default_settings/{default_setting}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | 設定名 |
current_location_flag | boolean | optional | 現在地からなら、1を、そうでないなら0を入れる |
latitude | string | optional | 緯度('35.71727401')みたいな数字 |
longitude | string | optional | 経度('140.00898606')みたいな数字 |
timer | integer | required | 始まるまでの時間'01:00:00'形式 |
group_id | integer | required | この設定を適用するグループid |
Query Parameters
Parameter | Status | Description |
---|---|---|
default_setting | required | 設定のid |
default_settings.destroy 一つのデフォルト設定を削除する
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/default_settings/{default_setting}"
const url = new URL("http://127.0.0.1:8000/api/default_settings/{default_setting}");
let params = {
"default_setting": "FRIPVUMvw5bvj4H1",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (204):
[]
HTTP Request
DELETE api/default_settings/{default_setting}
Query Parameters
Parameter | Status | Description |
---|---|---|
default_setting | required | 設定のid |
friends 友達
friends.index 友達一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/friends"
const url = new URL("http://127.0.0.1:8000/api/friends");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 5,
"unique_id": "iCx6Vo11cd",
"name": null,
"username": "浜田 太郎(デモ)",
"email": "demo5@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"permitted": 1,
"attribute": null,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"permitted": 1,
"attribute": {
"id": 32,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "同僚",
"plus_minus": 0,
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
GET api/friends
friends.store ◆友達申請する
Example request:
curl -X POST "http://127.0.0.1:8000/api/friends" \
-H "Content-Type: application/json" \
-d '{"email":"WN3GNh0EvrL5wpPx"}'
const url = new URL("http://127.0.0.1:8000/api/friends");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"email": "WN3GNh0EvrL5wpPx"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (201):
{
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"permitted": null,
"attribute": null,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
Example response (409):
{
"error": "すでにフレンドです"
}
HTTP Request
POST api/friends
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
string | required | 追加する友達のメールアドレス |
friends.blockingUsers 申請してきたけど、ブロックしたユーザー一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/friends/blocking"
const url = new URL("http://127.0.0.1:8000/api/friends/blocking");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 8,
"unique_id": "DDDDDDDD",
"name": null,
"username": "AAAAAAAAAAA",
"email": "new@new.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:19:00.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
}
}
HTTP Request
GET api/friends/blocking
friends.block_me_users 申請した中でブロックされているユーザー一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/friends/block_me"
const url = new URL("http://127.0.0.1:8000/api/friends/block_me");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": []
}
HTTP Request
GET api/friends/block_me
friends.waitingFriends 申請した中で待っているユーザー一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/friends/waiting"
const url = new URL("http://127.0.0.1:8000/api/friends/waiting");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 10,
"unique_id": "Vwh5MY3mmh",
"name": null,
"username": "testuser3",
"email": "newfriend@newfriend.com",
"unique_id_search_flag": 0,
"username_search_flag": 0,
"permitted": null,
"attribute": null,
"created_at": {
"date": "2019-03-10 06:09:58.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:09:58.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
GET api/friends/waiting
friends.permittingUsers 自分に申請してきたユーザーで、自分がそれを了承したユーザー(自分をフレンドとしているユーザー一覧)
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/friends/permitting"
const url = new URL("http://127.0.0.1:8000/api/friends/permitting");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"permitted": 1,
"attribute": {
"id": 27,
"manager": {
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "同僚",
"plus_minus": 0,
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
GET api/friends/permitting
friends.friendRequestUsers 自分に申請してきてるけど、まだ返事していない相手一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/friends/requested"
const url = new URL("http://127.0.0.1:8000/api/friends/requested");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 20,
"unique_id": "ghqfqIT2q9",
"name": null,
"username": "井上 亮介",
"email": "kumiko.kanou@example.org",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"permitted": null,
"attribute": {
"id": 70,
"manager": {
"id": 20,
"unique_id": "ghqfqIT2q9",
"name": null,
"username": "井上 亮介",
"email": "kumiko.kanou@example.org",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
"name": "velit",
"plus_minus": -1334,
"created_at": {
"date": "2019-03-03 02:18:29.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:29.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 27,
"unique_id": "Nz5K8ivimx",
"name": null,
"username": "津田 英樹",
"email": "asuka46@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"permitted": null,
"attribute": {
"id": 106,
"manager": {
"id": 27,
"unique_id": "Nz5K8ivimx",
"name": null,
"username": "津田 英樹",
"email": "asuka46@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
"name": "recusandae",
"plus_minus": 2830,
"created_at": {
"date": "2019-03-03 02:18:32.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:32.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 35,
"unique_id": "HGDG8UzkfG",
"name": null,
"username": "渚 京助",
"email": "ryohei.sasada@example.org",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"permitted": null,
"attribute": {
"id": 145,
"manager": {
"id": 35,
"unique_id": "HGDG8UzkfG",
"name": null,
"username": "渚 京助",
"email": "ryohei.sasada@example.org",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
"name": "itaque",
"plus_minus": 1636,
"created_at": {
"date": "2019-03-03 02:18:35.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:35.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 45,
"unique_id": "fusuk8nms5",
"name": null,
"username": "村山 亮介",
"email": "ryosuke.kobayashi@example.org",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"permitted": null,
"attribute": {
"id": 194,
"manager": {
"id": 45,
"unique_id": "fusuk8nms5",
"name": null,
"username": "村山 亮介",
"email": "ryosuke.kobayashi@example.org",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
"name": "quo",
"plus_minus": -1528,
"created_at": {
"date": "2019-03-03 02:18:40.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:40.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
}
]
}
HTTP Request
GET api/friends/requested
friends.permit 友達申請を許可
Example request:
curl -X POST "http://127.0.0.1:8000/api/friends/permit" \
-H "Content-Type: application/json" \
-d '{"user_id":4}'
const url = new URL("http://127.0.0.1:8000/api/friends/permit");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"user_id": 4
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"message": "招待を許可しました"
}
Example response (409):
{
"error": "そのユーザーからは招待されていません"
}
HTTP Request
POST api/friends/permit
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
user_id | integer | required | 友達申請してきてる人のユーザーID |
friends.reject 友達申請を拒否
Example request:
curl -X POST "http://127.0.0.1:8000/api/friends/reject" \
-H "Content-Type: application/json" \
-d '{"user_id":17}'
const url = new URL("http://127.0.0.1:8000/api/friends/reject");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"user_id": 17
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"message": "招待をキャンセルしました"
}
Example response (409):
{
"error": "そのユーザーからは招待されていません"
}
HTTP Request
POST api/friends/reject
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
user_id | integer | required | 友達申請してきてる人のユーザーID |
friends.update_attribute フレンドにつける属性IDを更新する
Example request:
curl -X PUT "http://127.0.0.1:8000/api/friends/{friend}/attribute" \
-H "Content-Type: application/json" \
-d '{"attribute_id":7}'
const url = new URL("http://127.0.0.1:8000/api/friends/{friend}/attribute");
let params = {
"friend": "k54A1vYkKRMvov0R",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"attribute_id": 7
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"message": "Too Many Attempts.",
"exception": "Illuminate\\Http\\Exceptions\\ThrottleRequestsException",
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/ThrottleRequests.php",
"line": 124,
"trace": [
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/ThrottleRequests.php",
"line": 53,
"function": "buildException",
"class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 151,
"function": "handle",
"class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 104,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php",
"line": 684,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php",
"line": 659,
"function": "runRouteWithinStack",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php",
"line": 625,
"function": "runRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php",
"line": 614,
"function": "dispatchToRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php",
"line": 176,
"function": "dispatch",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 30,
"function": "Illuminate\\Foundation\\Http\\{closure}",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "\/var\/www\/app\/Http\/Middleware\/RecordResponse.php",
"line": 24,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 151,
"function": "handle",
"class": "App\\Http\\Middleware\\RecordResponse",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/fideloper\/proxy\/src\/TrustProxies.php",
"line": 57,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 151,
"function": "handle",
"class": "Fideloper\\Proxy\\TrustProxies",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php",
"line": 31,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 151,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php",
"line": 31,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 151,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/ValidatePostSize.php",
"line": 27,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 151,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/CheckForMaintenanceMode.php",
"line": 62,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 151,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 104,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php",
"line": 151,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php",
"line": 116,
"function": "sendRequestThroughRouter",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Testing\/Concerns\/MakesHttpRequests.php",
"line": 345,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Testing\/Concerns\/MakesHttpRequests.php",
"line": 317,
"function": "call",
"class": "Illuminate\\Foundation\\Testing\\TestCase",
"type": "->"
},
{
"file": "\/var\/www\/tests\/TestCase.php",
"line": 27,
"function": "json",
"class": "Illuminate\\Foundation\\Testing\\TestCase",
"type": "->"
},
{
"file": "\/var\/www\/tests\/TestCase.php",
"line": 21,
"function": "api",
"class": "Tests\\TestCase",
"type": "->"
},
{
"file": "\/var\/www\/tests\/Unit\/GuestSessionTest.php",
"line": 25,
"function": "apiAs",
"class": "Tests\\TestCase",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/phpunit\/phpunit\/src\/Framework\/TestCase.php",
"line": 1153,
"function": "testShow",
"class": "Tests\\Unit\\GuestSessionTest",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/phpunit\/phpunit\/src\/Framework\/TestCase.php",
"line": 842,
"function": "runTest",
"class": "PHPUnit\\Framework\\TestCase",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/phpunit\/phpunit\/src\/Framework\/TestResult.php",
"line": 675,
"function": "runBare",
"class": "PHPUnit\\Framework\\TestCase",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/phpunit\/phpunit\/src\/Framework\/TestCase.php",
"line": 796,
"function": "run",
"class": "PHPUnit\\Framework\\TestResult",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/phpunit\/phpunit\/src\/Framework\/TestSuite.php",
"line": 746,
"function": "run",
"class": "PHPUnit\\Framework\\TestCase",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/phpunit\/phpunit\/src\/Framework\/TestSuite.php",
"line": 746,
"function": "run",
"class": "PHPUnit\\Framework\\TestSuite",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/phpunit\/phpunit\/src\/Framework\/TestSuite.php",
"line": 746,
"function": "run",
"class": "PHPUnit\\Framework\\TestSuite",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/phpunit\/phpunit\/src\/TextUI\/TestRunner.php",
"line": 629,
"function": "run",
"class": "PHPUnit\\Framework\\TestSuite",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/phpunit\/phpunit\/src\/TextUI\/Command.php",
"line": 206,
"function": "doRun",
"class": "PHPUnit\\TextUI\\TestRunner",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/phpunit\/phpunit\/src\/TextUI\/Command.php",
"line": 162,
"function": "run",
"class": "PHPUnit\\TextUI\\Command",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/phpunit\/phpunit\/phpunit",
"line": 61,
"function": "main",
"class": "PHPUnit\\TextUI\\Command",
"type": "::"
}
]
}
HTTP Request
PUT api/friends/{friend}/attribute
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
attribute_id | integer | required | 更新する属性ID |
Query Parameters
Parameter | Status | Description |
---|---|---|
friend | required | フレンドID |
friends.cancel_invitation 友達申請したけど、やっぱり取り消そう
Example request:
curl -X PUT "http://127.0.0.1:8000/api/friends/{friend}/cancel_invitation"
const url = new URL("http://127.0.0.1:8000/api/friends/{friend}/cancel_invitation");
let params = {
"friend": "sWcSteTwM8I7GZcv",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (204):
[]
HTTP Request
PUT api/friends/{friend}/cancel_invitation
Query Parameters
Parameter | Status | Description |
---|---|---|
friend | required | フレンドID |
friends.block ブロックする。すでに友達の場合は、削除もする
Example request:
curl -X PUT "http://127.0.0.1:8000/api/friends/{friend}/block"
const url = new URL("http://127.0.0.1:8000/api/friends/{friend}/block");
let params = {
"friend": "99tMHMOW7x8oRFzH",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"message": "ユーザーをブロックしました"
}
HTTP Request
PUT api/friends/{friend}/block
Query Parameters
Parameter | Status | Description |
---|---|---|
friend | required | フレンドID |
friends.unBlock ブロックしてたけど、かわいそうだから解除してやろう
Example request:
curl -X PUT "http://127.0.0.1:8000/api/friends/{friend}/un_block"
const url = new URL("http://127.0.0.1:8000/api/friends/{friend}/un_block");
let params = {
"friend": "M2rnejJOmWB1dCm5",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
[]
HTTP Request
PUT api/friends/{friend}/un_block
Query Parameters
Parameter | Status | Description |
---|---|---|
friend | required | フレンドID |
friends.show 特定の友達の詳細情報
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/friends/{friend}"
const url = new URL("http://127.0.0.1:8000/api/friends/{friend}");
let params = {
"friend": "y1vzp3tY9A7YDLtG",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"permitted": 1,
"attribute": {
"id": 32,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "同僚",
"plus_minus": 0,
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
GET api/friends/{friend}
Query Parameters
Parameter | Status | Description |
---|---|---|
friend | required | 友達のid |
friends.destory 友達から削除
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/friends/{friend}"
const url = new URL("http://127.0.0.1:8000/api/friends/{friend}");
let params = {
"friend": "sEXBkYFq6SY8MsB3",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (204):
[]
HTTP Request
DELETE api/friends/{friend}
Query Parameters
Parameter | Status | Description |
---|---|---|
friend | required | 友達のid |
general
push_notification.store_device_token android端末のデバイスIDを保存する
Example request:
curl -X POST "http://127.0.0.1:8000/api/device_token" \
-H "Content-Type: application/json" \
-d '{"device_token":"c7WZoHjvQE3FGQcx"}'
const url = new URL("http://127.0.0.1:8000/api/device_token");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"device_token": "c7WZoHjvQE3FGQcx"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (201):
{
"data": {
"id": 8,
"user": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"device_token": "newToken33OFs8hrRHF1tq12cT8g",
"created_at": {
"date": "2019-03-10 06:09:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:09:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
Example response (208):
{
"message": "このデバイストークンは登録済みです"
}
HTTP Request
POST api/device_token
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
device_token | string | required | 端末トークン(ID) |
api/admin/groups/{group}/users/{user}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/groups/{group}/users/{user}"
const url = new URL("http://127.0.0.1:8000/api/admin/groups/{group}/users/{user}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/groups/{group}/users/{user}
api/admin/sessions/{session}/users/{user}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/sessions/{session}/users/{user}"
const url = new URL("http://127.0.0.1:8000/api/admin/sessions/{session}/users/{user}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/sessions/{session}/users/{user}
api/admin/shops
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/shops"
const url = new URL("http://127.0.0.1:8000/api/admin/shops");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/shops
api/admin/shops/{shop}
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/shops/{shop}"
const url = new URL("http://127.0.0.1:8000/api/admin/shops/{shop}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/shops/{shop}
api/admin/shops/{shop}/sessions
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/shops/{shop}/sessions"
const url = new URL("http://127.0.0.1:8000/api/admin/shops/{shop}/sessions");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/shops/{shop}/sessions
api/admin/users/{user}/friends
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/users/{user}/friends"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/friends");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/users/{user}/friends
api/admin/users/{user}/friends/{friend}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/users/{user}/friends/{friend}"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/friends/{friend}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/users/{user}/friends/{friend}
ゲスト参加しているセッション一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/users/{user}/guests/sessions"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/guests/sessions");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/users/{user}/guests/sessions
api/admin/users/{user}/guests/sessions/{session}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/users/{user}/guests/sessions/{session}"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/guests/sessions/{session}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/users/{user}/guests/sessions/{session}
api/admin/users/{user}/guests/groups
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/users/{user}/guests/groups"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/guests/groups");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/users/{user}/guests/groups
api/admin/users/{user}/guests/groups/{group}
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/admin/users/{user}/guests/groups/{group}"
const url = new URL("http://127.0.0.1:8000/api/admin/users/{user}/guests/groups/{group}");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
DELETE api/admin/users/{user}/guests/groups/{group}
api/admin/test/notification
Example request:
curl -X POST "http://127.0.0.1:8000/api/admin/test/notification"
const url = new URL("http://127.0.0.1:8000/api/admin/test/notification");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
HTTP Request
POST api/admin/test/notification
api/admin/test/realtime
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/admin/test/realtime"
const url = new URL("http://127.0.0.1:8000/api/admin/test/realtime");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response:
null
HTTP Request
GET api/admin/test/realtime
groups.users グループのユーザー管理
groups.users.index あるグループのユーザー一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/groups/{group}/users"
const url = new URL("http://127.0.0.1:8000/api/groups/{group}/users");
let params = {
"group": "54wu4h8zd8tKecJS",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
GET api/groups/{group}/users
Query Parameters
Parameter | Status | Description |
---|---|---|
group | required | グループid |
groups.users.store グループにユーザーを追加する
Example request:
curl -X POST "http://127.0.0.1:8000/api/groups/{group}/users" \
-H "Content-Type: application/json" \
-d '{"user_id":13}'
const url = new URL("http://127.0.0.1:8000/api/groups/{group}/users");
let params = {
"group": "Tu7clCPwsMMvuWOs",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"user_id": 13
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": []
}
HTTP Request
POST api/groups/{group}/users
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
user_id | integer | required | 追加するユーザーのID |
Query Parameters
Parameter | Status | Description |
---|---|---|
group | required | グループid |
groups.users.show あるグループの中のひとりのユーザー情報を得る
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/groups/{group}/users/{user}"
const url = new URL("http://127.0.0.1:8000/api/groups/{group}/users/{user}");
let params = {
"group": "8lH3H0BfFFlvLvpk",
"user": "Sd6Vmd0gBEeJgADE",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
GET api/groups/{group}/users/{user}
Query Parameters
Parameter | Status | Description |
---|---|---|
group | required | グループid |
user | required | グループに所属する一人のユーザーのid |
groups.users.destory ユーザーをグループから削除
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/groups/{group}/users/{user}"
const url = new URL("http://127.0.0.1:8000/api/groups/{group}/users/{user}");
let params = {
"group": "MwIfDmVFlEaAIXpO",
"user": "K8RHQT45tZa2mPJ9",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (204):
[]
HTTP Request
DELETE api/groups/{group}/users/{user}
Query Parameters
Parameter | Status | Description |
---|---|---|
group | required | グループid |
user | required | グループに所属する一人のユーザーのid |
groups グループ
groups.index 自分が管理しているグループ一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/groups"
const url = new URL("http://127.0.0.1:8000/api/groups");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 7,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "いつもの",
"users": [
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
],
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
GET api/groups
groups.store グループを追加
Example request:
curl -X POST "http://127.0.0.1:8000/api/groups" \
-H "Content-Type: application/json" \
-d '{"name":"m0VzKgtCzLwXlhSX"}'
const url = new URL("http://127.0.0.1:8000/api/groups");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"name": "m0VzKgtCzLwXlhSX"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 9,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "いつもの",
"users": [],
"created_at": {
"date": "2019-03-10 06:10:09.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:09.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
POST api/groups
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | 新規グループの名前 |
groups.show グループ詳細
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/groups/{group}"
const url = new URL("http://127.0.0.1:8000/api/groups/{group}");
let params = {
"group": "6WZjxFsUAUnlSdpn",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 9,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "いつもの",
"users": [],
"created_at": {
"date": "2019-03-10 06:10:09.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:09.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
GET api/groups/{group}
Query Parameters
Parameter | Status | Description |
---|---|---|
group | required | グループid |
groups.update グループの情報を更新
Example request:
curl -X PUT "http://127.0.0.1:8000/api/groups/{group}" \
-H "Content-Type: application/json" \
-d '{"name":"eS9mE2XFnJvNUJjS"}'
const url = new URL("http://127.0.0.1:8000/api/groups/{group}");
let params = {
"group": "NJPmnQWIaeC37Cpn",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"name": "eS9mE2XFnJvNUJjS"
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 9,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "newGroup6ri5juOW",
"users": [],
"created_at": {
"date": "2019-03-10 06:10:09.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:09.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
PUT api/groups/{group}
PATCH api/groups/{group}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | 新たにつけるグループ名 |
Query Parameters
Parameter | Status | Description |
---|---|---|
group | required | グループid |
groups.destory グループを削除
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/groups/{group}"
const url = new URL("http://127.0.0.1:8000/api/groups/{group}");
let params = {
"group": "GtHagLJv3d2KSGSQ",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (204):
[]
Example response (409):
{
"error": "このグループを使用しているデフォルト設定があるので、削除できません"
}
HTTP Request
DELETE api/groups/{group}
Query Parameters
Parameter | Status | Description |
---|---|---|
group | required | グループid |
groups.can_add_users 対象のグループに追加できるユーザー一覧を返す(自分のフレンド−そのグループのメンバー)
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/groups/{group}/users/can_add"
const url = new URL("http://127.0.0.1:8000/api/groups/{group}/users/can_add");
let params = {
"group": "Yc6AOijS6yUnJidx",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"permitted": 1,
"attribute": {
"id": 32,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "同僚",
"plus_minus": 0,
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 11,
"unique_id": "xahPFOtmdG",
"name": null,
"username": "aaaa",
"email": "1ORnm@new.com",
"unique_id_search_flag": 0,
"username_search_flag": 0,
"permitted": 1,
"attribute": null,
"created_at": {
"date": "2019-03-10 06:10:03.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:03.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
GET api/groups/{group}/users/can_add
Query Parameters
Parameter | Status | Description |
---|---|---|
group | required | グループid |
guest ゲスト
guests.sessions.index ゲストとして参加しているセッション一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/guest/sessions"
const url = new URL("http://127.0.0.1:8000/api/guest/sessions");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": []
}
HTTP Request
GET api/guest/sessions
guests.sessions.wait ゲストとして招待されていて、まだ返事していないセション一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/guest/sessions/wait"
const url = new URL("http://127.0.0.1:8000/api/guest/sessions/wait");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": []
}
HTTP Request
GET api/guest/sessions/wait
guests.sessions.allow ゲストとして招待されていて、参加了承したセション一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/guest/sessions/allow"
const url = new URL("http://127.0.0.1:8000/api/guest/sessions/allow");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": []
}
HTTP Request
GET api/guest/sessions/allow
guests.sessions.deny ゲストとして招待されていて、参加拒否した一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/guest/sessions/deny"
const url = new URL("http://127.0.0.1:8000/api/guest/sessions/deny");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": []
}
HTTP Request
GET api/guest/sessions/deny
guests.sessions.show ゲストとして参加しているセッションの一つの詳細
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/guest/sessions/{session}"
const url = new URL("http://127.0.0.1:8000/api/guest/sessions/{session}");
let params = {
"session": "QyzAhe13Sjl0jxUM",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 150,
"name": "est",
"shop_id": "J000766202",
"budget": 3092,
"actual": 14706,
"start_time": "2019-02-26 02:18:40",
"end_time": null,
"unit_rounding_budget": "100",
"unit_rounding_actual": "100",
"manager": {
"id": 44,
"unique_id": "A0ed48OAxN",
"name": null,
"username": "浜田 修平",
"email": "taro94@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
"users": [
{
"id": 7,
"unique_id": "IU9ezbeLgk",
"name": null,
"username": "テスト太郎",
"email": "testuser@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "wait",
"paid": 0,
"plus_minus": null,
"attribute_name": null,
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:43.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 10,
"unique_id": "BVVVJJg6VW",
"name": null,
"username": "中島 翔太",
"email": "takuma33@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "wait",
"paid": 0,
"plus_minus": null,
"attribute_name": null,
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 11,
"unique_id": "Q72sXBbbJd",
"name": null,
"username": "井上 花子",
"email": "tomoya84@example.net",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "wait",
"paid": 0,
"plus_minus": null,
"attribute_name": null,
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 21,
"unique_id": "xQEY76BA28",
"name": null,
"username": "廣川 稔",
"email": "skimura@example.org",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "deny",
"paid": 0,
"plus_minus": null,
"attribute_name": null,
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 22,
"unique_id": "6vX1IwEk3r",
"name": null,
"username": "青山 くみ子",
"email": "kiriyama.kenichi@example.net",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "wait",
"paid": 0,
"plus_minus": null,
"attribute_name": null,
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 38,
"unique_id": "uWsX34AX7h",
"name": null,
"username": "高橋 浩",
"email": "cyamada@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "allow",
"paid": 1,
"plus_minus": null,
"attribute_name": null,
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 47,
"unique_id": "OhvXUSp8k3",
"name": null,
"username": "高橋 翔太",
"email": "matsumoto.shota@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "allow",
"paid": 1,
"plus_minus": null,
"attribute_name": null,
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
}
],
"created_at": {
"date": "2019-03-03 02:18:40.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:40.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
}
}
HTTP Request
GET api/guest/sessions/{session}
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | セッションid |
guests.sessions.update セッション参加状況を更新する(join_statusのみ。allow, wait, denyの文字のみ。)
Example request:
curl -X PUT "http://127.0.0.1:8000/api/guest/sessions/{session}" \
-H "Content-Type: application/json" \
-d '{"join_status":"q1Yb00YEvW1oMx6x"}'
const url = new URL("http://127.0.0.1:8000/api/guest/sessions/{session}");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"join_status": "q1Yb00YEvW1oMx6x"
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"message": "Token has expired",
"exception": "Tymon\\JWTAuth\\Exceptions\\TokenExpiredException",
"file": "\/var\/www\/vendor\/tymon\/jwt-auth\/src\/Claims\/Expiration.php",
"line": 31,
"trace": [
{
"function": "validatePayload",
"class": "Tymon\\JWTAuth\\Claims\\Expiration",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/tymon\/jwt-auth\/src\/Claims\/Collection.php",
"line": 62,
"function": "call_user_func_array"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Support\/Collection.php",
"line": 419,
"function": "Tymon\\JWTAuth\\Claims\\{closure}",
"class": "Tymon\\JWTAuth\\Claims\\Collection",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/tymon\/jwt-auth\/src\/Claims\/Collection.php",
"line": 64,
"function": "each",
"class": "Illuminate\\Support\\Collection",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/tymon\/jwt-auth\/src\/Validators\/PayloadValidator.php",
"line": 83,
"function": "validate",
"class": "Tymon\\JWTAuth\\Claims\\Collection",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/tymon\/jwt-auth\/src\/Validators\/PayloadValidator.php",
"line": 51,
"function": "validatePayload",
"class": "Tymon\\JWTAuth\\Validators\\PayloadValidator",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/tymon\/jwt-auth\/src\/Payload.php",
"line": 46,
"function": "check",
"class": "Tymon\\JWTAuth\\Validators\\PayloadValidator",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/tymon\/jwt-auth\/src\/Factory.php",
"line": 187,
"function": "__construct",
"class": "Tymon\\JWTAuth\\Payload",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/tymon\/jwt-auth\/src\/Factory.php",
"line": 87,
"function": "withClaims",
"class": "Tymon\\JWTAuth\\Factory",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/tymon\/jwt-auth\/src\/Manager.php",
"line": 106,
"function": "make",
"class": "Tymon\\JWTAuth\\Factory",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/tymon\/jwt-auth\/src\/JWT.php",
"line": 200,
"function": "decode",
"class": "Tymon\\JWTAuth\\Manager",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/tymon\/jwt-auth\/src\/JWTAuth.php",
"line": 64,
"function": "getPayload",
"class": "Tymon\\JWTAuth\\JWT",
"type": "->"
},
{
"file": "\/var\/www\/app\/Http\/Middleware\/JWT.php",
"line": 20,
"function": "authenticate",
"class": "Tymon\\JWTAuth\\JWTAuth",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 163,
"function": "handle",
"class": "App\\Http\\Middleware\\JWT",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/barryvdh\/laravel-cors\/src\/HandleCors.php",
"line": 58,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 163,
"function": "handle",
"class": "Barryvdh\\Cors\\HandleCors",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/SubstituteBindings.php",
"line": 41,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 163,
"function": "handle",
"class": "Illuminate\\Routing\\Middleware\\SubstituteBindings",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/ThrottleRequests.php",
"line": 58,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 163,
"function": "handle",
"class": "Illuminate\\Routing\\Middleware\\ThrottleRequests",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 104,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php",
"line": 684,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php",
"line": 659,
"function": "runRouteWithinStack",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php",
"line": 625,
"function": "runRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php",
"line": 614,
"function": "dispatchToRoute",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php",
"line": 176,
"function": "dispatch",
"class": "Illuminate\\Routing\\Router",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 30,
"function": "Illuminate\\Foundation\\Http\\{closure}",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "\/var\/www\/app\/Http\/Middleware\/RecordResponse.php",
"line": 24,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 163,
"function": "handle",
"class": "App\\Http\\Middleware\\RecordResponse",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/fideloper\/proxy\/src\/TrustProxies.php",
"line": 57,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 163,
"function": "handle",
"class": "Fideloper\\Proxy\\TrustProxies",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php",
"line": 31,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 163,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php",
"line": 31,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 163,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/ValidatePostSize.php",
"line": 27,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 163,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/CheckForMaintenanceMode.php",
"line": 62,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 163,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/barryvdh\/laravel-cors\/src\/HandlePreflight.php",
"line": 29,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 163,
"function": "handle",
"class": "Barryvdh\\Cors\\HandlePreflight",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Pipeline.php",
"line": 53,
"function": "Illuminate\\Pipeline\\{closure}",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php",
"line": 104,
"function": "Illuminate\\Routing\\{closure}",
"class": "Illuminate\\Routing\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php",
"line": 151,
"function": "then",
"class": "Illuminate\\Pipeline\\Pipeline",
"type": "->"
},
{
"file": "\/var\/www\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php",
"line": 116,
"function": "sendRequestThroughRouter",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
},
{
"file": "\/var\/www\/public\/index.php",
"line": 55,
"function": "handle",
"class": "Illuminate\\Foundation\\Http\\Kernel",
"type": "->"
}
]
}
HTTP Request
PUT api/guest/sessions/{session}
PATCH api/guest/sessions/{session}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
join_status | string | required | 参加状況のステータス['allow', 'wait', 'deny'] |
hotpepper ホットペッパー検索系
hotpepper.search.favorite ホットペッパーの検索の際に、店IDをおすすめ順に並べ替える。その中に自分のいったことのある店があれば、[1番人気, 2番人気, 行ったことがある]の順に返す。なければ、[1番人気, 2番人気, 3番人気]の順に返す。レスポンス速度があやしい。
Example request:
curl -X POST "http://127.0.0.1:8000/api/hotpepper/recommend" \
-H "Content-Type: application/json" \
-d '{"body":"Db1vLcDmYhONVGqP","count":1}'
const url = new URL("http://127.0.0.1:8000/api/hotpepper/recommend");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"body": "Db1vLcDmYhONVGqP",
"count": 1
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
"J001098881",
"J001182578",
"J001100873"
]
}
HTTP Request
POST api/hotpepper/recommend
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
body | 連想配列 | required | ホットペッパーの検索の際に使う、クエリパラメータをAPIKEYを除いて渡す |
count | integer | optional | 返却する店件数(指定なしの場合3件) |
profile プロフィール
profiles.update 自分の情報を更新
Example request:
curl -X PUT "http://127.0.0.1:8000/api/profile/update" \
-H "Content-Type: application/json" \
-d '{"unique_id":"A8H484eRW818UxSC","email":"U1WuYWHrvCM3nz8C","username":"lpUoQ7FCnaErnNbN","password":"uXKBbtSE5udo2Mtz","unique_id_search_flag":false,"username_search_flag":false}'
const url = new URL("http://127.0.0.1:8000/api/profile/update");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"unique_id": "A8H484eRW818UxSC",
"email": "U1WuYWHrvCM3nz8C",
"username": "lpUoQ7FCnaErnNbN",
"password": "uXKBbtSE5udo2Mtz",
"unique_id_search_flag": false,
"username_search_flag": false
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 8,
"unique_id": "DDDDDDDD",
"name": null,
"username": "AAAAAAAAAAA",
"email": "new@new.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:19:00.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
}
}
HTTP Request
PUT api/profile/update
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
unique_id | string | required | |
string | required | ||
username | string | required | |
password | string | required | |
unique_id_search_flag | boolean | required | |
username_search_flag | boolean | required |
search 検索
search.can_add_friend_users 友達追加可能なユーザー一覧を返す
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/search/can_add_friend_users"
const url = new URL("http://127.0.0.1:8000/api/search/can_add_friend_users");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 1,
"unique_id": "O6cGcA1xaU",
"name": null,
"username": "浜田 太郎",
"email": "hamada@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:46.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:46.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 2,
"unique_id": "4vQetLuR8T",
"name": null,
"username": "山田 忠明",
"email": "yamada@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:46.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:46.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 3,
"unique_id": "CSDktqpIYQ",
"name": null,
"username": "田中 信也",
"email": "tanaka@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:46.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:46.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 4,
"unique_id": "3Lnb4yIkoo",
"name": null,
"username": "山本 京介",
"email": "yamamoto@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:46.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:46.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 5,
"unique_id": "iCx6Vo11cd",
"name": null,
"username": "浜田 太郎(デモ)",
"email": "demo5@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 10,
"unique_id": "Vwh5MY3mmh",
"name": null,
"username": "testuser3",
"email": "newfriend@newfriend.com",
"unique_id_search_flag": 0,
"username_search_flag": 0,
"created_at": {
"date": "2019-03-10 06:09:58.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:09:58.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 12,
"unique_id": "yWeN4UOfBn",
"name": null,
"username": "aaaa",
"email": "1TKd6Q@new.com",
"unique_id_search_flag": 0,
"username_search_flag": 0,
"created_at": {
"date": "2019-03-10 06:10:04.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:04.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 13,
"unique_id": "0F2EgROyCT",
"name": null,
"username": "aaaa",
"email": "QOC7Leq@new.com",
"unique_id_search_flag": 0,
"username_search_flag": 0,
"created_at": {
"date": "2019-03-10 06:10:05.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:05.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 14,
"unique_id": "KsYq8cTOXv",
"name": null,
"username": "aaaa",
"email": "dgSlgovi@new.com",
"unique_id_search_flag": 0,
"username_search_flag": 0,
"created_at": {
"date": "2019-03-10 06:10:06.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:06.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
GET api/search/can_add_friend_users
search.forward_by_username ユーザーネームで検索し、複数を返す(前方一致)
Example request:
curl -X POST "http://127.0.0.1:8000/api/search/forward_by_username" \
-H "Content-Type: application/json" \
-d '{"username":"8i8k8HVTAu6zdJhW"}'
const url = new URL("http://127.0.0.1:8000/api/search/forward_by_username");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"username": "8i8k8HVTAu6zdJhW"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 7,
"unique_id": "IU9ezbeLgk",
"name": null,
"username": "テスト太郎",
"email": "testuser@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:43.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 48,
"unique_id": "CwqZQH3cr8",
"name": null,
"username": "テストユーザー2",
"email": "testuser48@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:43.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 49,
"unique_id": "4u3Rpoh35C",
"name": null,
"username": "テストユーザー2",
"email": "testuser49@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:43.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 50,
"unique_id": "ewhZ6yiT4W",
"name": null,
"username": "テストユーザー3",
"email": "testuser50@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:43.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
}
]
}
HTTP Request
POST api/search/forward_by_username
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
username | string | optional |
search.perfect_by_unique_id ユニークidで検索し、あれば一件返す(完全一致)
Example request:
curl -X POST "http://127.0.0.1:8000/api/search/perfect_by_unique_id" \
-H "Content-Type: application/json" \
-d '{"unique_id":"dt7wVNIdOBS9ojLm"}'
const url = new URL("http://127.0.0.1:8000/api/search/perfect_by_unique_id");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"unique_id": "dt7wVNIdOBS9ojLm"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 1,
"unique_id": "TESTTEST",
"name": null,
"username": "幹事 浜田",
"email": "hamada-manager@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-03 02:18:19.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:19.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
}
}
HTTP Request
POST api/search/perfect_by_unique_id
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
unique_id | string | required |
search.forward_by_unique_id ユニークidで検索し、あれば一件返す(前方一致)
Example request:
curl -X POST "http://127.0.0.1:8000/api/search/forward_by_unique_id" \
-H "Content-Type: application/json" \
-d '{"unique_id":"DLE3jwGl5GIE3zLK"}'
const url = new URL("http://127.0.0.1:8000/api/search/forward_by_unique_id");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"unique_id": "DLE3jwGl5GIE3zLK"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
POST api/search/forward_by_unique_id
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
unique_id | string | optional |
sessions.users セッションのユーザー管理
sessions.users.index あるセッションのユーザー一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/sessions/{session}/users"
const url = new URL("http://127.0.0.1:8000/api/sessions/{session}/users");
let params = {
"session": "6mqVdVrzwdfd3adv",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 23,
"unique_id": "OdfKn4PJeo",
"name": null,
"username": "宇野 さゆり",
"email": "hkato@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "wait",
"paid": 0,
"plus_minus": null,
"attribute_name": null,
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 36,
"unique_id": "TT7N4dkYI3",
"name": null,
"username": "伊藤 七夏",
"email": "yamagishi.mikako@example.org",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "allow",
"paid": 1,
"plus_minus": null,
"attribute_name": null,
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 38,
"unique_id": "uWsX34AX7h",
"name": null,
"username": "高橋 浩",
"email": "cyamada@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "wait",
"paid": 0,
"plus_minus": null,
"attribute_name": null,
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 43,
"unique_id": "w5IZ1MHmnA",
"name": null,
"username": "井上 明美",
"email": "kazuya71@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "allow",
"paid": 1,
"plus_minus": null,
"attribute_name": null,
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
},
{
"id": 50,
"unique_id": "ewhZ6yiT4W",
"name": null,
"username": "テストユーザー3",
"email": "testuser50@example.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "wait",
"paid": 0,
"plus_minus": null,
"attribute_name": null,
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-03 02:18:22.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"updated_at": {
"date": "2019-03-03 02:18:43.000000",
"timezone_type": 3,
"timezone": "UTC"
},
"deleted_at": null
}
]
}
HTTP Request
GET api/sessions/{session}/users
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | セッションid |
sessions.users.store ◆セッションにユーザーを追加する
Example request:
curl -X POST "http://127.0.0.1:8000/api/sessions/{session}/users" \
-H "Content-Type: application/json" \
-d '{"user_id":"N3PFlza915IJE06D","join_status":"UTEtz7ELYwrKGWEv","paid":9,"budget":18,"budget_actual":12}'
const url = new URL("http://127.0.0.1:8000/api/sessions/{session}/users");
let params = {
"session": "FZdX5U1Zzd5SjZdi",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"user_id": "N3PFlza915IJE06D",
"join_status": "UTEtz7ELYwrKGWEv",
"paid": 9,
"budget": 18,
"budget_actual": 12
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 11,
"unique_id": "xahPFOtmdG",
"name": null,
"username": "aaaa",
"email": "1ORnm@new.com",
"unique_id_search_flag": 0,
"username_search_flag": 0,
"join_status": "allow",
"paid": 0,
"plus_minus": 0,
"attribute_name": "",
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-10 06:10:03.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:03.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
POST api/sessions/{session}/users
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
user_id | string | required | 追加するユーザーのID |
join_status | string | optional | 参加状況のステータス['allow', 'wait', 'deny'] デフォルトでは wait |
paid | integer | optional | 支払いしたか |
budget | integer | optional | 支払い予定額 |
budget_actual | integer | optional | 支払い確定金額 |
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | セッションid |
sessions.users.show セッションの中の一人のユーザーの詳細を得る(属性とか見たりするでしょう)
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/sessions/{session}/users/{user}"
const url = new URL("http://127.0.0.1:8000/api/sessions/{session}/users/{user}");
let params = {
"session": "2W21Ars0F6qy4ONF",
"user": "0XHRbc5Qy5abWQP5",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 11,
"unique_id": "xahPFOtmdG",
"name": null,
"username": "aaaa",
"email": "1ORnm@new.com",
"unique_id_search_flag": 0,
"username_search_flag": 0,
"join_status": "allow",
"paid": 0,
"plus_minus": 0,
"attribute_name": "",
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-10 06:10:03.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:03.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
GET api/sessions/{session}/users/{user}
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | セッションid |
user | required | セッションに属するユーザーのid |
sessions.users.update セッションの中のユーザーのステータスなどを更新する
Example request:
curl -X PUT "http://127.0.0.1:8000/api/sessions/{session}/users/{user}" \
-H "Content-Type: application/json" \
-d '{"join_status":19,"paid":12,"plus_minus":2,"attribute_name":"wd8xn0UcZym9EeLm","budget":17,"budget_actual":15}'
const url = new URL("http://127.0.0.1:8000/api/sessions/{session}/users/{user}");
let params = {
"session": "HrobnA6unZ8afMxi",
"user": "2EQYXzOaBVDM3B4A",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"join_status": 19,
"paid": 12,
"plus_minus": 2,
"attribute_name": "wd8xn0UcZym9EeLm",
"budget": 17,
"budget_actual": 15
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 11,
"unique_id": "xahPFOtmdG",
"name": null,
"username": "aaaa",
"email": "1ORnm@new.com",
"unique_id_search_flag": 0,
"username_search_flag": 0,
"join_status": "allow",
"paid": 0,
"plus_minus": 10000,
"attribute_name": "",
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-10 06:10:03.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:03.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
PUT api/sessions/{session}/users/{user}
PATCH api/sessions/{session}/users/{user}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
join_status | integer | optional | 参加状況のステータス |
paid | integer | optional | 支払いしたか |
plus_minus | integer | optional | 加減算。セッションに追加時は、フレンドとしてのplus_minusが自動適用される。 |
attribute_name | string | optional | このuserのこのセッションにおける属性名。セッションに追加時は、フレンドとしての属性名が自動適用される |
budget | integer | optional | 支払い予定額 |
budget_actual | integer | optional | 支払い確定金額 |
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | セッションid |
user | required | セッションに属するユーザーのid |
sessions.users.destory セッションからユーザーを削除する
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/sessions/{session}/users/{user}"
const url = new URL("http://127.0.0.1:8000/api/sessions/{session}/users/{user}");
let params = {
"session": "eSa0nDHJv6f8FBqG",
"user": "EYCvP2jvCadQKsrP",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (204):
[]
HTTP Request
DELETE api/sessions/{session}/users/{user}
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | セッションid |
user | required | セッションに属するユーザーのid |
sessions.users.switch_paid 指定したセッションのuserの支払い状況を反転する
Example request:
curl -X PUT "http://127.0.0.1:8000/api/sessions/{session}/users/{user}/switch_paid"
const url = new URL("http://127.0.0.1:8000/api/sessions/{session}/users/{user}/switch_paid");
let params = {
"session": "P1Y6umdwtjXn3EDN",
"user": "WFhWYvlVdi3dj1mi",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "PUT",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "wait",
"paid": 0,
"plus_minus": 0,
"attribute_name": "同僚",
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
PUT api/sessions/{session}/users/{user}/switch_paid
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | セッションid |
user | required | セッションに属するユーザーのid |
sessions.users.store_group ◆セッションにあるグループのメンバーを追加する。(重複はしないように追加される。また、join_statusは、 waitなどのDBの初期値で決め打ちされる)。追加した後のsessionのuser一覧を返す
Example request:
curl -X POST "http://127.0.0.1:8000/api/sessions/{session}/groups/{group}"
const url = new URL("http://127.0.0.1:8000/api/sessions/{session}/groups/{group}");
let params = {
"session": "hhSZha6OZAy7quer",
"group": "hClLjI2zt4uXq6Rw",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "POST",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"join_status": "wait",
"paid": 0,
"plus_minus": 0,
"attribute_name": "同僚",
"budget": null,
"budget_actual": null,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
POST api/sessions/{session}/groups/{group}
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | セッションid |
group | required | 追加するグループ |
session イベントセッション
sessions.index 管理しているセッション一覧
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/sessions"
const url = new URL("http://127.0.0.1:8000/api/sessions");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": []
}
HTTP Request
GET api/sessions
sessions.store セッションを作成
Example request:
curl -X POST "http://127.0.0.1:8000/api/sessions" \
-H "Content-Type: application/json" \
-d '{"name":"ZZI6gnczV9JVi35f","shop_id":"hBXf4ntSoOjUrvlh","budget":8,"actual":14,"unit_rounding_budget":16,"unit_rounding_actual":8,"start_time":"TO8ZtPcgYGCLJ36h","end_time":"Vme74ukOzinW0dOr"}'
const url = new URL("http://127.0.0.1:8000/api/sessions");
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"name": "ZZI6gnczV9JVi35f",
"shop_id": "hBXf4ntSoOjUrvlh",
"budget": 8,
"actual": 14,
"unit_rounding_budget": 16,
"unit_rounding_actual": 8,
"start_time": "TO8ZtPcgYGCLJ36h",
"end_time": "Vme74ukOzinW0dOr"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 3,
"name": "newSessionyrXHD",
"shop_id": "34",
"budget": 3000,
"actual": 3000,
"start_time": null,
"end_time": null,
"unit_rounding_budget": "100",
"unit_rounding_actual": "100",
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"users": [],
"created_at": {
"date": "2019-03-10 06:10:19.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:19.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
POST api/sessions
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | required | 新規セッションの名前 |
shop_id | string | optional | ショップのID(ぐるなび?) |
budget | integer | optional | 予算額 |
actual | integer | optional | 実際の金額 |
unit_rounding_budget | integer | optional | 丸め単位(1, 10, 100, 1000, 10000) |
unit_rounding_actual | integer | optional | 丸め単位(1, 10, 100, 1000, 10000) |
start_time | datetime | optional | セッションの開始時刻 |
end_time | datetime | optional | セッションの終了時刻 |
sessions.index_with_only_allow_users 管理しているセッション一覧(allow ユーザーのみを取得した、セッション情報を返す)
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/sessions/with_only_allow_users"
const url = new URL("http://127.0.0.1:8000/api/sessions/with_only_allow_users");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": []
}
HTTP Request
GET api/sessions/with_only_allow_users
sessions.not_start 始まっていないセッション一覧(【条件式】今 < start_time && deleted_at == null)
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/sessions/not_start"
const url = new URL("http://127.0.0.1:8000/api/sessions/not_start");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": []
}
HTTP Request
GET api/sessions/not_start
sessions.on_going 進行中のセッション一覧(【条件式】start_time < 今 < end_time && deleted_at == null)
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/sessions/on_going"
const url = new URL("http://127.0.0.1:8000/api/sessions/on_going");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": []
}
HTTP Request
GET api/sessions/on_going
sessions.not_payment_complete セッションのendtimeを迎えたもののうち、支払い待ちユーザーがいるセッション一覧。join_status がallowのもののみ判定。(【条件式】end_time < 今 && deleted_at == null && 支払いがまだのユーザーがいる)
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/sessions/not_payment_complete"
const url = new URL("http://127.0.0.1:8000/api/sessions/not_payment_complete");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": []
}
HTTP Request
GET api/sessions/not_payment_complete
sessions.history セッション履歴(deleted_atに時間が入っているもの。ようするに、幹事が削除したセッション一覧)(【条件式】deleted_at != null)
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/sessions/history"
const url = new URL("http://127.0.0.1:8000/api/sessions/history");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": []
}
HTTP Request
GET api/sessions/history
sessions.complete end_timeを過ぎて、かつ、支払いも完了しているが、セッション削除はしていない。join_status がallowのもののみ判定。(【条件式】end_time < 今 && deleted_at == null && 全ユーザーの支払いが完了している)
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/sessions/complete"
const url = new URL("http://127.0.0.1:8000/api/sessions/complete");
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": []
}
HTTP Request
GET api/sessions/complete
sessions.show 一つのセッションの詳細
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/sessions/{session}"
const url = new URL("http://127.0.0.1:8000/api/sessions/{session}");
let params = {
"session": "PRFrMzPZSNmSCO6k",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 3,
"name": "newSessionyrXHD",
"shop_id": "34",
"budget": 3000,
"actual": 3000,
"start_time": null,
"end_time": null,
"unit_rounding_budget": "100",
"unit_rounding_actual": "100",
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"users": [],
"created_at": {
"date": "2019-03-10 06:10:19.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:19.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
GET api/sessions/{session}
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | セッションid |
sessions.update セッション情報を更新
Example request:
curl -X PUT "http://127.0.0.1:8000/api/sessions/{session}" \
-H "Content-Type: application/json" \
-d '{"name":"vlNFMZ49hn5Aqf3F","shop_id":3,"budget":20,"actual":13,"unit_rounding_budget":1,"unit_rounding_actual":14,"start_time":"f1RfQfzO6MDh8mn6","end_time":"weJ9TFinCZeGUdyR"}'
const url = new URL("http://127.0.0.1:8000/api/sessions/{session}");
let params = {
"session": "QgI7MGVWpv7tA0QB",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
}
let body = {
"name": "vlNFMZ49hn5Aqf3F",
"shop_id": 3,
"budget": 20,
"actual": 13,
"unit_rounding_budget": 1,
"unit_rounding_actual": 14,
"start_time": "f1RfQfzO6MDh8mn6",
"end_time": "weJ9TFinCZeGUdyR"
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 3,
"name": "newUpdateSessioni9kfL",
"shop_id": "34",
"budget": 5000,
"actual": 3000,
"start_time": null,
"end_time": null,
"unit_rounding_budget": "100",
"unit_rounding_actual": "100",
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"users": [],
"created_at": {
"date": "2019-03-10 06:10:19.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:21.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
PUT api/sessions/{session}
PATCH api/sessions/{session}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
name | string | optional | 新規セッションの名前 |
shop_id | integer | optional | ショップのID(ぐるなび?) |
budget | integer | optional | 予算額 |
actual | integer | optional | 実際の金額 |
unit_rounding_budget | integer | optional | 丸め単位(1, 10, 100, 1000, 10000) |
unit_rounding_actual | integer | optional | 丸め単位(1, 10, 100, 1000, 10000) |
start_time | datetime | optional | セッションの開始時刻 |
end_time | datetime | optional | セッションの終了時刻 |
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | セッションid |
sessions.destory セッションを削除
Example request:
curl -X DELETE "http://127.0.0.1:8000/api/sessions/{session}"
const url = new URL("http://127.0.0.1:8000/api/sessions/{session}");
let params = {
"session": "6VFY40yD0oiDRvfz",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (204):
[]
HTTP Request
DELETE api/sessions/{session}
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | セッションid |
sessions.show_with_only_allow_users allow ユーザーのみを取得した、セッション情報を返す
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/sessions/{session}/with_only_allow_users"
const url = new URL("http://127.0.0.1:8000/api/sessions/{session}/with_only_allow_users");
let params = {
"session": "kCS1TKz1LaZmRtiw",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": {
"id": 3,
"name": "newSessionyrXHD",
"shop_id": "34",
"budget": 3000,
"actual": 3000,
"start_time": null,
"end_time": null,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"users": [],
"created_at": {
"date": "2019-03-10 06:10:19.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:19.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
}
HTTP Request
GET api/sessions/{session}/with_only_allow_users
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | セッションid |
sessions.can_add_users 対象のセッションに追加できるユーザー一覧を返す(自分のフレンド−そのセッションのメンバー)
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/sessions/{session}/users/can_add"
const url = new URL("http://127.0.0.1:8000/api/sessions/{session}/users/can_add");
let params = {
"session": "gdkF0zeHEL2661C3",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"permitted": 1,
"attribute": {
"id": 32,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "同僚",
"plus_minus": 0,
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 11,
"unique_id": "xahPFOtmdG",
"name": null,
"username": "aaaa",
"email": "1ORnm@new.com",
"unique_id_search_flag": 0,
"username_search_flag": 0,
"permitted": 1,
"attribute": null,
"created_at": {
"date": "2019-03-10 06:10:03.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:03.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
GET api/sessions/{session}/users/can_add
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | グループid |
sessions.can_add_groups 対象のセッションに追加できるグループ一覧を返す(全員がすでにセッションに含まれている場合のみ除く)
Example request:
curl -X GET -G "http://127.0.0.1:8000/api/sessions/{session}/groups/can_add"
const url = new URL("http://127.0.0.1:8000/api/sessions/{session}/groups/can_add");
let params = {
"session": "as0dbY16gNpjOtxY",
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Accept": "application/json",
"Content-Type": "application/json",
}
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
Example response (200):
{
"data": [
{
"id": 7,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "いつもの",
"users": [
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
],
"created_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:50.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 12,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "newGroupOFYTq",
"users": [
{
"id": 6,
"unique_id": "TmAy4yeWsW",
"name": null,
"username": "山田 忠明(デモ)",
"email": "demo6@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
],
"created_at": {
"date": "2019-03-10 06:10:12.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:12.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
{
"id": 13,
"manager": {
"id": 7,
"unique_id": "GOPiy9Zugv",
"name": null,
"username": "田中 信也(デモ)",
"email": "demo7@hew.com",
"unique_id_search_flag": 1,
"username_search_flag": 1,
"created_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 03:35:49.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
},
"name": "newGroupYapnN",
"users": [
{
"id": 11,
"unique_id": "xahPFOtmdG",
"name": null,
"username": "aaaa",
"email": "1ORnm@new.com",
"unique_id_search_flag": 0,
"username_search_flag": 0,
"created_at": {
"date": "2019-03-10 06:10:03.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:03.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
],
"created_at": {
"date": "2019-03-10 06:10:12.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"updated_at": {
"date": "2019-03-10 06:10:12.000000",
"timezone_type": 3,
"timezone": "Asia\/Tokyo"
},
"deleted_at": null
}
]
}
HTTP Request
GET api/sessions/{session}/groups/can_add
Query Parameters
Parameter | Status | Description |
---|---|---|
session | required | グループid |