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) - 1:男、2:女
-
-
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
- goal_id: sample
-
-
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: ログインエラー
-
目標の新規追加を行います。
-
Request (application/json)
-
Headers
Authorization: token
-
Attribute
- child_id: 1 (number)
- content: practice
- criteria: 20 (number) - 達成目標数
- deadline :
2018-07-01
- 達成期日(なければ空)
-
-
Response 200 (application/json)
-
Attribute
- goal_id: sample
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
使用するdevice_idを登録します
-
Request (application/json)
-
Headers
Authorization: token
-
Attribute
- goal_id: sample
- device_id: sample
-
-
Response 200 (application/json)
-
Attribute
- success: 登録しました。
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
登録されている目標と実行回数を取得します。
-
Request
-
Headers
Authorization: token
-
-
Response 200 (application/json)
- Attributes
- goals(array)
- (object)
- child_id: 1 (number)
- nickname: nicname
- child_goals(array)
- (object)
- created_at:
2018-06-21T13:35:08+09:00
- goal_id : test - 目標ID
- device_id : sample
- run : 5 (number) - 目標実行数
- content: practice - 目標名称
- criteria: 20 (number) - 達成目標数
- deadline :
2018-07-11T13:35:08+09:00
- 達成期日(なければ空) - status : 0 (number) - 達成状況(0:未実行、1:実行中、2:達成済み、3:達成失敗)
- updated_at:
2018-06-21T13:37:21+09:00
,
- created_at:
- (object)
- created_at:
2018-06-21T13:35:08+09:00
- goal_id : sample
- device_id : hoge
- run : 5 (number)
- content: index
- criteria: 30 (number)
- deadline : なし
- status : 0 (number) - 達成状況(0:未実行、1:実行中、2:達成済み、3:達成失敗)
- updated_at:
2018-06-21T13:37:21+09:00
,
- created_at:
- (object)
- (object)
- child_id: 2 (number)
- nickname: sample
- child_goals(array)
- (object)
- created_at:
2018-06-21T13:35:08+09:00
- goal_id : index - 目標ID
- device_id : index
- run : 5 (number) - 目標実行数
- content: practice - 目標名称
- criteria: 20 (number) - 達成目標数
- deadline :
2018-07-11T13:35:08+09:00
- 達成期日(なければ空) - status : 0 (number) - 達成状況(0:未実行、1:実行中、2:達成済み、3:達成失敗)
- updated_at:
2018-06-21T13:37:21+09:00
,
- created_at:
- (object)
- (object)
- goals(array)
- Attributes
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
登録されている目標を削除します。
-
Parameters
- goal_id : sample
-
Request
-
Headers
Authorization: token
-
-
Response 200 (application/json)
-
Attribute
- success: 目標を削除しました。
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
目標実行数を変更します。
-
Request (application/json)
-
Headers
Authorization: token
-
Attribute
- goal_id: sample
- approval : 1 (number) - 増減値
-
-
Response 200 (application/json)
-
Attribute
- success: 目標達成を承認しました。
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
オリジナルメッセージの登録を行います。
-
Request (application/json)
-
Headers
Authorization: token
-
Attribute
- goal_id: sample
- message_call : 5 (number) - メッセージ出力条件
- 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)
- goal_id: sample
- content: practice
- message_call: 2 (number)
- message: practice
- (object)
- goal_id: index
- content: test
- message_call: 5 (number)
- message: sample
- (object)
- (object)
- child_id: 2 (number)
- nickname: index
- child_messages(array)
- (object)
- goal_id: buf
- content: sample
- message_call: 3 (number)
- message: sample
- (object)
- goal_id: hoge
- content: test
- message_call: 10 (number)
- message: hoge
- (object)
- (object)
- messages(array)
-
-
Response 400 (application/json)
-
Attribute
- error: ログインエラー
-
オリジナルメッセージの削除を行います。
-
Parameters
- goal_id: sample
- message_call: 5 (number)
-
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 (applicaition/json)
- Attribute
- device_id: sample
- Attribute
-
Response 200 (application/json)
-
Attribute
- angle: 72 (number)
-
-
Response 400 (application/json)
-
Attribute
- error: 目標IDが見つかりません。
-