# エンドポイント [TOC] ## ユーザ登録 **POST /api/v1/user/register** ### Body | 名前 | 型 | 必須 | | -------- | -------- | -------- | | name | string | Yes | | password | string | Yes | | email| string | Yes | | age | int | Yes | | gender | boolean | Yes | | nearest_station | string | Yes | ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | name | string | Yes | | age | int | Yes | | gender | boolean | Yes | | nearest_station | string | Yes | | token | string | Yes | | email| string | Yes | ## ユーザログイン **POST /api/v1//user/login** ### Body | 名前 | 型 | 必須 | | -------- | -------- | -------- | | name | string | Yes | | password | string | Yes | | email| string | Yes | ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | name | string | Yes | | age | int | Yes | | gender | boolean | Yes | | nearest_station | string | Yes | | token | string | Yes | | email| string | Yes | ## ユーザ情報取得 **GET /api/v1//user?token=** ### Body | 名前 | 型 | 必須 | | -------- | -------- | -------- | | Token | string | Yes | ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | name | string | Yes | | age | int | Yes | | gender | boolean | Yes | | nearest_station | string | Yes | | token | string | Yes | | email| string | Yes | ## ユーザ削除 **DELETE /api/v1//user?token=** ### Body | 名前 | 型 | 必須 | | -------- | -------- | -------- | | Token | string | Yes | ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | deleted | boolean | Yes | ## ユーザ情報変更 **PUT /api/v1//user?token=** **PATCH /api/v1//user?token=** ### Body | 名前 | 型 | 必須 | | -------- | -------- | -------- | | name | string | No | | password | string | No | | email| string | No | | age | int | No | | gender | boolean | No | | nearest_station | string | No | ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | name | string | Yes | | age | int | Yes | | gender | boolean | Yes | | nearest_station | string | Yes | | token | string | Yes | | email| string | Yes | ## トップのプラン取得 **GET /api/v1/plan/top** ### Body ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | plans | Array\<TopPlanClass\> | Yes | #### \<TopPlanClass\>(ざっくり) | 名前 | 型 | 必須 | | -------- | -------- | -------- | | id | int | Yes | | title | string | Yes | | image | string | Yes | | review | double | Yes | | days_nights | int | Yes | | min_budget | int | Yes | | max_budget | int | Yes | | number_of_people | int | Yes | | purposes | Array\<String\> | Yes | ## プラン情報の取得 **GET /api/v1/plan/info?id=** ### Body | 名前 | 型 | 必須 | | -------- | -------- | -------- | | id | int | Yes | ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | plan_info | Array\<PlanInfoResponseClass\> | Yes | #### \<PlanInfoResponseClass\> | 名前 | 型 | 必須 | | -------- | -------- | -------- | | id | int | Yes | | title | string | Yes | | body(説明文) | string | Yes | | start_time | Date | Yes | | end_time | Date | Yes | | image_path | string | Yes | | type | enum\<PlanType\> | Yes | #### enum\<PlanType\> - SPOT - MOVE ## プラン情報の詳細の取得 **GET /api/v1/plan/detail?id=** ### Body | 名前 | 型 | 必須 | | -------- | -------- | -------- | | id | int | Yes | | token | string | Yes | ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | title | string | Yes | | body | string | Yes | | review | int | Yes | // 星の数 | link | string | Yes | | image_paths | Array\<ImageClass\> | Yes | | user_reviews | Array\<ReviewClass\> | Yes | | address | string | Yes | #### \<ReviewClass\> | 名前 | 型 | 必須 | | -------- | -------- | -------- | | sentence | string | Yes | | icon | string | Yes | | body | string | Yes | | evaluation | double | Yes | #### \<ImageClass\> | 名前 | 型 | 必須 | | -------- | -------- | -------- | | image_type | enum\<ImageType\> | Yes | | image_path | string | Yes | #### enum\<ImageType\> - MAIN - SUB ## プランのタグ一覧取得 **GET /api/v1/propose/tags** ### Body なし ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | tags | Array\<TagClass\> | Yes | ### TagClass | 名前 | 型 | 必須 | | -------- | -------- | -------- | | id | int | Yes | | name | string | Yes | ## プランのエリア提案 **GET /api/v1/propose/1?token=** ### Body | 名前 | 型 | 必須 | | -------- | -------- | -------- | | agriculture | Boolean | Yes | | forestry | Boolean | Yes | | fishing_industry | Boolean | Yes | | budget | int | Yes | | from_date | Date | Yes | | to_date | Date | Yes | ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | area_list | Array\<AreaInfoClass\> | Yes | ### AreaInfoClass | 名前 | 型 | 必須 | メモ | | -------- | -------- | -------- | -------- | | id | int | Yes | 都道府県のid | | name | string | Yes | 都道府県名 | | match_score | int | Yes | おすすめ度 | | population | String | Yes | 人口(多い、普通、少ない) | | congestion_rate | Float | Yes | 過去の混雑率 | ## プランの提案(行く地域を決めた後) **GET /api/v1/propose/2?token=** ### Body | 名前 | 型 | 必須 | メモ | | -------- | -------- | -------- | -------- | | prefecture_id | int | Yes | 都道府県のid | | plan_tags | Array\<int\> | Yes | プランのタグ | | from_date | Date | Yes | | to_date | Date | Yes | ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | plan_infos | Array\<ProposeClass\> | Yes | #### \<ProposeClass\> | 名前 | 型 | 必須 | | -------- | -------- | -------- | | title | string | Yes | | plans | Array\<PlanClass\> | Yes | <!-- ## プランの提案 **GET /api/v1/plan/propose** ### Body | 名前 | 型 | 必須 | | -------- | -------- | -------- | | purpose | enum\<Purpose\> | Yes | | budget | int | Yes | | from_date | Date | Yes | | to_date | Date | Yes | | token | string | Yes | ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | plan_info | Array\<ProposeClass\> | Yes | #### \<ProposeClass\> | 名前 | 型 | 必須 | | -------- | -------- | -------- | | title | string | Yes | | plans | Array\<PlanClass\> | Yes | --> ## 現在進行中のプランの取得 **GET /api/v1/plan/now_navigation?token=** ### Body | 名前 | 型 | 必須 | | -------- | -------- | -------- | | token | string | Yes | ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | plan | ProposeClass | Yes ## 意見の送信 **POST /api/v1/app/contact?token=** ### クエリ - token ### Body | 名前 | 型 | 必須 | | -------- | -------- | -------- | | text | string | Yes | ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | done | boolean | Yes | ## 不具合報告 **POST /api/v1/app/feedback?token=** ### クエリ - token ### Body | 名前 | 型 | 必須 | | -------- | -------- | -------- | | text | string | Yes | ### Response | 名前 | 型 | 必須 | | -------- | -------- | -------- | | done | boolean | Yes | ## 路線取得 **GET /api/v1/lines** ### クエリ - token ### Response ``` { "lines" : [ { "id": 1, "name": "山手線" }, ... ] } ``` ## 駅取得 **GET /api/v1/line/{line_id}/stations** ### クエリ - token ### Response ``` { "stations" : [ { "id": 1, "name": "新宿駅" }, ... ] } ```