URL /journey/create
Method: POST
Auth required : YES
Data constraints
{
"title":"[Journey 的标题]",
"description":"[Journey 的描述]",
"userId": "[Journey 创建者的 id]",
"waypoints":[
{
"label":"[路径点的名字]]",
"time":"[到达路径点的时间(格式为 hh-mm )]",
"coordinate": "[路径点的坐标(格式为)(lat, lng)]"
}
]
}
Data example
{
"title":"string",
"description":"string",
"userId": 0,
"waypoints":[
{
"label":"place-name",
"time":"8-0",
"coordinate": "(45, 45)"
}
]
}
Code : 200 OK
Content example
{
"code":200,
"description":"Create journey successfully.",
"timestamp":"2022-11-19T01:54:46.832+0000",
"data": null,
}
Code : 400 FAILED
Content example
{
"code": 400,
"description": "Authorization failed.",
"timestamp": "2022-11-19T01:54:46.832+0000",
"data": null
}
OR
{
"code": 400,
"description": "Journey has existed.",
"timestamp": "2022-11-19T01:54:46.832+0000",
"data": null
}