Pasajeros - Taller2Uber/application-server GitHub Wiki
Obtener Pasajeros
Obtener todos los pasajeros.
URL : /api/v1/passengers
Method : GET
Success Response
Condition : Si se pueden obtener los pasajeros.
Code : 200
Content example
[
{
"first_name": "default",
"last_name": "default",
"gender": null,
"firebase_token": "df7Bfmbs_KU:APA91bGIHoBUaFEVJ-HvGav__9D0rODHFwaC-aAfho6Tkbd5Ul83PzcOhc2yQ15-Hmtq12D9bqPBrD-WnxAZ8hxahQaz3UTYIz4DdpBNfjm61z7rrDmA6UKMNNbN3EI2O_jSZO8lZQ1q",
"fb_id": "",
"longitude": null,
"state": "no_route",
"birthday": "1970-09-09T00:00:00.000Z",
"actual_route": null,
"country": "default",
"latitude": null,
"_ref": "a82798b0c1fd4aff70cdfa600b0007e95607abf0",
"_id": {
"$oid": "5a26ba8ce69acb000be4178f"
},
"user_name": "passenger",
"email": "default",
"ss_id": 276
}
]
Obtener pasajero por Id
Obtener un pasajero por su id.
URL : /api/v1/passengers/<passenger_id>
Method : GET
Success Response
Condition : Si se puede obtener el pasajero.
Code : 200
Content example
{
"first_name": "default",
"last_name": "default",
"gender": null,
"firebase_token": "df7Bfmbs_KU:APA91bGIHoBUaFEVJ-HvGav__9D0rODHFwaC-aAfho6Tkbd5Ul83PzcOhc2yQ15-Hmtq12D9bqPBrD-WnxAZ8hxahQaz3UTYIz4DdpBNfjm61z7rrDmA6UKMNNbN3EI2O_jSZO8lZQ1q",
"fb_id": "",
"longitude": null,
"state": "no_route",
"birthday": "1970-09-09T00:00:00.000Z",
"actual_route": null,
"country": "default",
"latitude": null,
"_ref": "a82798b0c1fd4aff70cdfa600b0007e95607abf0",
"_id": {
"$oid": "5a26ba8ce69acb000be4178f"
},
"user_name": "passenger",
"email": "default",
"ss_id": 276
}
Actualizar pasajero
Actualizar datos de pasajero.
URL : /api/v1/passengers/<passenger_id>
Method : PUT
Content example
{
"first_name": "default",
"last_name": "default",
"gender": null,
"firebase_token": "df7Bfmbs_KU:APA91bGIHoBUaFEVJ-HvGav__9D0rODHFwaC-aAfho6Tkbd5Ul83PzcOhc2yQ15-Hmtq12D9bqPBrD-WnxAZ8hxahQaz3UTYIz4DdpBNfjm61z7rrDmA6UKMNNbN3EI2O_jSZO8lZQ1q",
"fb_id": "",
"longitude": null,
"state": "no_route",
"birthday": "1970-09-09T00:00:00.000Z",
"actual_route": null,
"country": "default",
"latitude": null,
"_ref": "a82798b0c1fd4aff70cdfa600b0007e95607abf0",
"_id": {
"$oid": "5a26ba8ce69acb000be4178f"
},
"user_name": "passenger",
"email": "default"
}
Success Response
Condition : Si se puede actualizar el conductor.
Code : 200
Content example
{
"first_name": "default",
"last_name": "default",
"gender": null,
"firebase_token": "df7Bfmbs_KU:APA91bGIHoBUaFEVJ-HvGav__9D0rODHFwaC-aAfho6Tkbd5Ul83PzcOhc2yQ15-Hmtq12D9bqPBrD-WnxAZ8hxahQaz3UTYIz4DdpBNfjm61z7rrDmA6UKMNNbN3EI2O_jSZO8lZQ1q",
"fb_id": "",
"longitude": null,
"state": "no_route",
"birthday": "1970-09-09T00:00:00.000Z",
"actual_route": null,
"country": "default",
"latitude": null,
"_ref": "a82798b0c1fd4aff70cdfa600b0007e95607abf0",
"_id": {
"$oid": "5a26ba8ce69acb000be4178f"
},
"user_name": "passenger",
"email": "default",
"ss_id": 276
}