-
Notifications
You must be signed in to change notification settings - Fork 4
API Document
tomokon edited this page Mar 3, 2021
·
26 revisions
- URL
- Method
- 説明
- Request
- Response
/lending- POST
- 貸す人が貸出情報の登録をする。
{
'accessToekn': string (貸す人のアクセストークン),
'content': string (貸すもの),
'deadline': Datetime (期限)
}
{
'lendingId': int (貸出id)
}
/lending- PUT
- lendingIdで指定された貸出情報に借りた人(アクセストークンから取得)を紐付ける.
{
'accessToken': string (借りる人のアクセストークン),
'lendingid': string (貸出id)
}
{
'lendingId': int (貸出id),
'content': string (借りたもの),
'deadline': Datetime (期限),
'ownerName': string (貸した人の名前)
}
/lending- GET
- あるユーザの貸したものの一覧を取得する
{
'accessToekn': string (アクセストークン)
}
{
'list': {
...LendInfo,
'borrowerName': string (借りた人の名前)
}[]
}
/lending- GET
- あるユーザの借りたものの一覧を取得する
{
'accessToekn': string (アクセストークン)
}
{
'list': {
...LendInfo,
'borrowerName': string (借りた人の名前)
}[]
}
/lending/return- PUT
- 貸出情報のステータスを返却済みにする
{
'ledingId': int (貸出id)
}
{
'lendInfo': LendInfo
}
/bot/~~~
貸出情報
LendInfo
{
'lendingId': int (貸出id),
'ownerId': int (貸した人のid),
'borrowerId': int (借りた人のid),
'content': string (貸すもの),
'deadline': Datetime (期限)
}