FORMAT: 1A
ユーザー情報の登録、およびサインインするためのAPI
ユーザー情報の登録を行います。
-
Request (applicaition/json)
- Attribute
- name: sample
- pass: password
- Attribute
-
Response 200 (application/json)
-
Attribute
- success: ユーザー登録を行いました。
-
-
Response 400 (application/json)
-
Attribute
- error: 登録済みのユーザー名です。
-
登録されているユーザー情報を元にサインインを行います。
-
Request (applicaition/json)
- Attribute
- name: sample
- pass: password
- Attribute
-
Response 200 (application/json)
-
Attribute
- token: sample
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
登録されているユーザー情報を削除します。
-
Request
-
Headers
Authorization: token
-
-
Response 200 (application/json)
-
Attribute
- success: ユーザー情報を削除しました。
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
子供の誕生日と性別、ニックネームを設定します。
-
Request(application/json)
-
Headers
Authorization: token
-
Attributes
- nickname: sample
- birthday :
2000-01-01
- sex : 0 (number) - 0:男、1:女
-
-
Response 200 (application/json)
-
Attribute
- child_id: 1 (number)
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
子供ID,誕生日,ニックネーム,性別の一覧を取得します。
-
Request(application/json)
-
Headers
Authorization: token
-
-
Response 200 (application/json)
-
Attributes
- children (array)
-
(object)
- child_id: 1 (number)
- birthday:
2016-10-01T09:00:00+09:00
- nickname: sample
- sex: 0 (number) - 0:男、1:女
-
(object)
- child_id: 2 (number)
- birthday:
2017-03-19T09:00:00+09:00
- nickname: index
- sex: 1 (number) - 0:男、1:女
-
- children (array)
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
登録されている子どもIDの情報を削除します。
-
Parameters
- child_id: 1
-
Request
-
Headers
Authorization: token
-
-
Response 200 (application/json)
-
Attribute
- success: 削除しました。
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
新規登録するデバイスIDの発行を行います。
-
Request(application/json)
-
Headers
Authorization: token
-
Attribute
- child_id: 1 (number)
-
-
Response 200 (application/json)
-
Attribute
- pin: 0000
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
現在登録されているデバイスIDの一覧を取得します。
-
Request(application/json)
-
Headers
Authorization: token
-
-
Response 200 (application/json)
-
Attributes
- devices (array)
- (object)
- child_id :1 (number)
- nickname: sample
- child_devices (array)
- sample,
- index
- (object)
- child_id: 2 (number)
- nickname: test
- child_devices (array)
- test,
- buf
- (object)
- devices (array)
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
登録されているデバイスIDを削除します。
-
Parameters
- device_id: sample
-
Request
-
Headers
Authorization: token
-
-
Response 200 (application/json)
-
Attribute
- success: ボタンIDを削除しました。
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
BOCCOAPIに登録したメールアドレスと、パスワードの入力
-
Request
-
Headers
Authorization: token
-
Attribute
- email: [email protected]
- key : sample - APIkey
- pass: abc123
-
-
Response 200 (application/json)
-
Attribute
- success: メールアドレスとパスワードを登録しました。
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
BOCCOAPIに登録したメールアドレスの取得
-
Request
-
Headers
Authorization: token
-
-
Response 200 (application/json)
-
Attribute
- email: [email protected]
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
BOCCOAPIに登録したメールアドレスと、パスワードの削除
-
Request
-
Headers
Authorization: token
-
-
Response 200 (application/json)
-
Attribute
- success: メールアドレスとパスワードを削除しました。
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
指定された子どもの記録情報を取得
-
Parameters
- child_id: 1
- filter: date - もしくはgenre
-
Request
-
Headers
Authorization: token
-
-
Response 200 (application/json)
-
Attributes
- records (array)
-
(object)
- date:
2018-06-21T13:35:08+09:00
- 回答日時 - num_ans: 10(number) - 回答数
- num_corr: 5(number)- 正答数
- date:
-
(object)
- date:
2018-06-22T13:35:08+09:00
- num_ans: 7(number) - 回答数
- num_corr: 6(number)- 正答数
- date:
-
- records (array)
-
Attributes
- records (array)
-
(object)
- num_probs: 50 - ジャンルの総問題数
- genre: 算数 - 回答ジャンル
- num_ans: 10(number) - 回答数
- num_corr: 5(number)- 正答数
-
(object)
- num_probs: 30 - ジャンルの総問題数
- genre: 社会 - 回答ジャンル
- num_ans: 8(number) - 回答数
- num_corr: 8(number)- 正答数
-
- records (array)
-
-
Response 400 (application/json)
-
Attribute
- error: 回答情報が見つかりませんでした。
-
指定された子どもの記録情報を取得
-
Parameters
- child_id: 1
- date:
2018-07-04
- genre: 1 - genre_id
-
Request
-
Headers
Authorization: token
-
-
Response 200 (application/json)
- Attributes
- records (array)
-
(object)
- date:
2018-06-21T13:35:08+09:00
- 回答日時 - genre_name: 算数
- detail(array)
-
(object)
- sentence: 1 + 1は?
- user_ans: 2
- correct: 2
- result: true (boolean) - 正解:true,不正解:false
-
(object)
- sentence: 3 - 2は?
- user_ans: 2
- correct: 1
- result: false (boolean)
-
- date:
-
(object)
- date:
2018-06-22T13:35:08+09:00
- genre_name: 社会
- detail(array)
- (object)
- sentence: 兵庫県の県庁所在地は?
- user_answer: 兵庫市
- correct: 神戸市
- result: false (boolean)
- (object)
- date:
-
- records (array)
- Attributes
-
Response 400 (application/json)
-
Attribute
- error: 回答情報が見つかりませんでした。
-
オリジナルメッセージの登録を行います。
-
Request (application/json)
-
Headers
Authorization: token
-
Attribute
- child_id: 1 (number)
- message_call : 3 (number) - (1: 正解,2:不正解,3: 連続正解時)
- condition : 10 (number) - 3の時
- message: practice
-
-
Response 200 (application/json)
-
Attribute
- success: メッセージを編集しました。
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
登録されているメッセージとメッセージ出力条件を取得します。
-
Request
-
Headers
Authorization: token
-
-
Response 200 (application/json)
-
Attributes
- messages(array)
- (object)
- child_id: 1 (number)
- nickname: sample
- child_messages(array)
- (object)
- message_call: 2 (number)
- message: practice
- (object)
- message_call: 3 (number)
- condtion: 5 (number)
- message: sample
- (object)
- (object)
- child_id: 2 (number)
- nickname: index
- child_messages(array)
- (object)
- message_call: 3 (number)
- condition: 10 (number)
- message: sample
- (object)
- message_call: 1 (number)
- message: hoge
- (object)
- (object)
- messages(array)
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
オリジナルメッセージの削除を行います。
-
Parameters
- message_id: sample
-
Request (application/json)
-
Headers
Authorization: token
-
-
Response 200 (application/json)
-
Attribute
- success: メッセージを削除しました。
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
デバイスIDと各デバイスとの紐付けを行います。
-
Request (applicaition/json)
- Attribute
- pin: 0000
- Attribute
-
Response 200 (application/json)
-
Attribute
- device_id: sample
-
Response 400 (application/json)
-
Attribute
- error: pinが見つかりません。
-
デバイス情報と読み取ったタグの情報を送信。
-
Request(application/json)
- Attribute
- device_id: sample
- uuid: 1234
- old_uuid: 5678
- Attribute
-
Response 200 (application/json)
-
Attribute
- success: true (boolean)
-
-
Response 418 (application/json)
-
Attribute
- error: データベースエラー
-
問題データをDBに登録
-
Request(application/json)
- Attribute
- book_id: 1(number)
- question_no: 1(number)
- sentence(array)
- (object)
- tag_id: sample
- text: 回文はどれ?
- (object)
- answer(array)
- (object)
- tag_id: index
- text: 絵本
- (object)
- tag_id: buf
- text: 新聞紙
- (object)
- tag_id: hoge
- text: 漫画
- (object)
- correct: buf
- genre: 1
- Attribute
-
Response 200 (application/json)
-
Attribute
- success: true (boolean)
-
-
Response 400 (application/json)
-
Attribute
- error: 登録に失敗しました。
-
問題分野を追加
-
Request(application/json)
- Attribute
- genre_name: 英語
- Attribute
-
Response 200 (application/json)
-
Attribute
- genre_id: 1 (number)
-
-
Response 400 (application/json)
-
Attribute
- error: 登録に失敗しました。
-
登録されている分野を取得
-
Response 200 (application/json)
-
Attribute
- genre(array)
- 算数
- 社会
- 英語
- genre(array)
-
-
Response 400 (application/json)
-
Attribute
- error: 分野が登録されていませんでした。
-