# API仕様
## このメモについて
~~思考整理用のメモです.
この仕様が適用されるわけではありません.~~
これがAPI仕様書替わりです
## [POST]タスク分類API
### 概要
入力文章からタスクを推定する.
### URL
```
/classification
```
### Request
```
{
text: string,
}
```
### Response
```
{
task: string,
}
```
### taskについて
タスク名をstringで表す
- 雑談: talk
- 予定追加: todo
- アラーム: alarm
## [POST]雑談API
雑談用対話API
### URL
```
/talk
```
### Request
```
{
text: string,
}
```
### Response
```
{
text: string,
}
```
## [POST]予定設定API
予定設定用対話API.
textを特徴抽出し,stateの不明部分に挿入して返却する.
### URL
```
/todo
```
### Request
```
{
text: string,
todoState: {
task: string || null,
todoTime: {
year: int || null,
month: int || null,
day: int || null,
hour: int || null,
minute: int || null,
},
place: string || null,
step: int
},
}
```
### Response
```
{
text: string,
todoState: {
task: string || null,
todoTime: {
year: int || null,
month: int || null,
day: int || null,
hour: int || null,
minute: int || null,
},
place: string || null,
step: int
},
}
```
### 備考
- yearとmonthはデフォルト値を入れておく
- taskはできたらラベリングする(出来なきゃ応答文をそのまま突っ込む)
- stepは0で終了,1以上で続行
## [POST]目覚まし時刻設定API
目覚ましの設定用API.
textを特徴抽出し,stateの不明部分に挿入して返却する.
### URL
```
/alarm
```
### Request
```
{
text: string,
alarmState: {
hour: int || null,
minute: int || null,
step: int
},
}
```
### Response
```
{
text: string,
alarmState: {
hour: int || null,
minute: int || null,
step: int,
},
}
```
- 目覚まし時刻設定,繰り返し設定をどう実装するか考える必要あり
- 実装しない
- stepは0が終了,1以上が続行