Skip to content

LaurierMantel/SaveMe-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SaveMe-API

REST API for SaveMe Application

Endpoints

Create a new user:

POST to http://www.savemeapi.herokuapp.com/api/users. You can pass the following in the body, all as strings: - name - email - phone - device_id (something I put if you want to generate some device specific metadata)

If successful, this will respond with a JSON with a success message, and the user object. You should save the _user_id, as this is necessary for creating emergencies.

Edit user:

PUT to http://www.savemeapi.herokuapp.com/api/users/:user_id You can pass all the above params in the body. It will respond with the user object if successful.

Create contact:

POST to http://www.savemeapi.herokuapp.com/api/contacts You can pass all the following params in the body: - name - email - phone all as strings of course Will return a contact object with an id, you should save this in case you want to edit contacts later Edit contact same as editing user

Create emergency:

POST to http://www.savemeapi.herokuapp.com/api/emergencies You can pass the following params in the body: - user_id - location (string)

It will return the emergency object, not that useful to you but at least you will know it was successful.

About

REST API for SaveMe Application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published