- Develop on Mac OSX Yosemite or later
- Use ruby 2.2.0
- Use http://postgresapp.com/ for Postgres. It includes Postgis, which we need.
- Don't forget to create Postgis extension in your database:
$ psql <database_name>
CREATE EXTENSION Postgis;
Run tests automatically with:
bundle exec guard
Leave it open. It will run on changes.
We use RGeo with the AR Postgis adapter.
Try to make things easy.
Remember to only return useful error messages if authorised. Otherwise you're creating security issues.
Test all code. It's a pain in the ass to have untested code around. Ruby is too easy to not write untested code.
Prepend everything with /api/v1
Set location x, y, z (optional), m (optional) of current user.
Pre-auth implementation: add param id
to specify user.
Get last stored location of current user.
Pre-auth implementation: add param id
to specify user.
Get friends of current user.
Adds one or more friends by phone_nrs in an array.
Params:
- phone_nrs (Array with Strings)
For example:
post /api/v1/users/1/friends?phone_nrs=['12345']
Returns user with :id.
Returns all users.
Creates a user.
Params:
- first_name
- last_name
Update a user.
Delete a user.
Returns all pending meetups.
Request a meetup if none is outstanding.
Accept a meetup if one is outstanding.