Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trips Api #1

Open
zzarcon opened this issue Oct 16, 2016 · 0 comments
Open

Trips Api #1

zzarcon opened this issue Oct 16, 2016 · 0 comments

Comments

@zzarcon
Copy link
Member

zzarcon commented Oct 16, 2016

GET /trips

Query params: user

{
  "trips": [
    {
      "id": "1",
      "country": "RUS",
      "status": "done",
      "start_date": "2016-10-10T15:48:56+00:00",
      "end_date": "2016-10-16T15:48:56+00:00"
    },
    {
      "id": "1",
      "country": "USA",
      "status": "pending",
      "start_date": null,
      "end_date": null,
      "friend_ids": null
    }
  ],
  "users": [
    {
      "id": "1",
      "name": "Bibek"
    },
    {
      "id": "2",
      "name": "Joan"
    },
    {
      "id": "3",
      "name": "Lorenzo"
    }
  ]
}

POST /trips

 {
   "country": "USA",
   "status": "pending",
   "start_date": null,
   "end_date": null,
   "friend_ids": null
 }

Trip statuses

  • done: The trip is done.
  • pending: You will do this trip at some point but you don't know yet when.
  • planed [TBD]: Difference with pending is that has start_date and end_date are set and friend_ids can be modified, i.e. this can increase engagement since people may ask to join already planed trips
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant