Skip to content

Instantly share code, notes, and snippets.

@walidum
Created May 12, 2021 08:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walidum/aa69cd39a42c3cc0ac63cd0b42875620 to your computer and use it in GitHub Desktop.
Save walidum/aa69cd39a42c3cc0ac63cd0b42875620 to your computer and use it in GitHub Desktop.
explication
before calling the api "api/requestride" you have to call this new api to get all the availble categories :
you can check this screenshot : https://trello-attachments.s3.amazonaws.com/5fd72c7f63214e10a993c085/5fd76009f0c11f2fe8dc0d59/59b804115822931142d40052774cf2e4/Screenshot_20210104-154130_Wesselni.jpg
POST : api/grabrides
params :
{
user_id:'',
pickup_location:'',
pickup_lat:'',
pickup_lng:'',
drop_location:'',
drop_lat:'',
drop_lng: '',
distance:''
}
exemple of response (when we have tow availble categories VTC and MOTO):
{
status: 'true',
available_ride: [
{
_id: '5cb61ec21d5f4f56a0ae7e58',
category_name: 'VTC',
baseprice: 500,
},
{
_id: '5e68c629bcf576270969a406',
category_name: 'MOTO',
baseprice: 250,
}
]
}
exemple of response (when we have one availble category VTC):
{
status: 'true',
available_ride: [
{
_id: '5cb61ec21d5f4f56a0ae7e58',
category_name: 'VTC',
baseprice: 500,
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment