Public API Easy way to do a lot!



Overview

Hello Developers.

The Don't Eat Alone API Platform can be used to build automated, authentic, high-quality apps and services that:

  • Help individuals share their own content with 3rd party apps.
  • Help developers generate content and build apps baced on our service
  • Help brands and advertisers understand, manage their audience and media rights.
  • Help to connect your software to Our application

Login & Registration

Login

You can simply login to the system by sending [POST] request to: https://donteatalone.azurewebsites.net/api/login

Data Types:
Name Type Description
email String Standard email adress
password String Password must include one uppercase and lower case letter, a number and a special symbol and be at least 8 characters
rememberMe boolean True or False

Code example:

fetch(https://donteatalone.azurewebsites.net/api/login, { method: 'POST', body: JSON.stringify({ "email": "myemail@mail.ru", "password": "password", "rememberMe": "false" }), headers: new Headers({ 'Content-Type': 'application/json' }) })
SignUp

You can simply signup to the system by sending [POST] request to: https://donteatalone.azurewebsites.net/api/signup

Data Types:
Name Type Description
email String Standard email adress
firstname String Regular string
lastname String Regular string
city String Valid city
province String Valid Province
password String Password must include one uppercase and lower case letter, a number and a special symbol and be at least 8 characters
confirm password String Password must include one uppercase and lower case letter, a number and a special symbol and be at least 8 characters

Code example:

fetch(https://donteatalone.azurewebsites.net/api/signup, { method: 'POST', body: JSON.stringify({ "email": "myemail@mail.ru", "firstname": "John", "lastname": "Doe", "city": "Vancouver", "province": "BC", "password": "password", "confirmpassword": "password" }), headers: new Headers({ 'Content-Type': 'application/json' }) })

Reservations

Get All Reservations

You can simply get list of reservations by sending [GET] request to: https://donteatalone.azurewebsites.net/api/getall

Code example:

fetch(https://donteatalone.azurewebsites.net/api/getall)
Get All Reservations

You can simply get a specific resertation information by sending [GET] request with ID parameter to: https://donteatalone.azurewebsites.net/api/get/ID

Code example:

fetch(https://donteatalone.azurewebsites.net/api/get/$#id)
Delete Reservation

You can simply delete a specific resertation information by sending [DELETE] request with ID parameter to: https://donteatalone.azurewebsites.net/api/delete/ID

Code example:

fetch(https://donteatalone.azurewebsites.net/api/delete/$#id)
Update Reservation

You can simply update a specific resertation information by sending [Put] request to: https://donteatalone.azurewebsites.net/api/update

Data Types:
Name Type Description
id Integer Long value
title String Regular string
dateStart long Time in milliseconds
dateEnd long Time in milliseconds
peopleNumber Integer From 1 to 20
status String [available, finished, in progress]
locationsId Integer Long value

Code example:

fetch(https://donteatalone.azurewebsites.net/api/update, { method: 'PUT', body: JSON.stringify({ "id": "31312312", "title": "Food is good", "dateStart": "2016-05-06T20:14:25.694Z", "dateEnd": "2016-05-06T23:12:00.694Z", "peopleNumber": "5", "status": "available", "locationId": "1231223123" }), headers: new Headers({ 'Content-Type': 'application/json' }) })
Create Reservation

You can simply create a specific resertation information by sending [Put] request to: https://donteatalone.azurewebsites.net/api/create

Data Types:
Name Type Description
title String Regular string
dateStart long Time in milliseconds
dateEnd long Time in milliseconds
peopleNumber Integer From 1 to 20
status String [available, finished, in progress]
locationsId Long Long value

Code example:

fetch(https://donteatalone.azurewebsites.net/api/create, { method: 'PUT', body: JSON.stringify({ "title": "Food is good", "dateStart": "2016-05-06T20:14:25.694Z", "dateEnd": "2016-05-06T23:12:00.694Z", "peopleNumber": "5", "status": "available", "locationId": "1231223123" }), headers: new Headers({ 'Content-Type': 'application/json' }) })

Comments

Create Comment

You can simply create a comment by sending [PUT] request to: https://donteatalone.azurewebsites.net/api/createcomment

Data Types:
Name Type Description
reservationId Long Long value
body String Regular string
date long Time in milliseconds
authorId Long Long value
fetch(https://donteatalone.azurewebsites.net/api/createcomment, { method: 'PUT', body: JSON.stringify({ "reservationId": "12323112", "body": "My new comment", "date": "2016-05-06T23:12:00.694Z", "AuthorID": "5", }), headers: new Headers({ 'Content-Type': 'application/json' }) })
Update Comment

You can simply update a comment by sending [PUT] request to: https://donteatalone.azurewebsites.net/api/updatecomment

Data Types:
Name Type Description
id Long Long value
reservationId Long Long value
body String Regular string
date long Time in milliseconds
authorId Long Long value
fetch(https://donteatalone.azurewebsites.net/api/updatecomment, { method: 'PUT', body: JSON.stringify({ "id": "913762719", "reservationId": "12323112", "body": "My new comment", "date": "2016-05-06T23:12:00.694Z", "AuthorID": "5", }), headers: new Headers({ 'Content-Type': 'application/json' }) })
Delete Comment

You can simply delete a comment by sending [DELETE] request to: https://donteatalone.azurewebsites.net/api/deletecomment

fetch(https://donteatalone.azurewebsites.net/api/deletecomment, { method: 'DELETE', body: JSON.stringify({ "id": "913762719" }), headers: new Headers({ 'Content-Type': 'application/json' }) })
Get All Comments For a Specific Reservation

You can simply get all comments for a specific reservation by sending [GET] with a specific ID request to: https://donteatalone.azurewebsites.net/api/getcomments/{id}

Code example:

fetch(https://donteatalone.azurewebsites.net/api/getcomments/{id})
Get All Comments

You can simply get all comments for a specific reservation by sending [GET] request to: https://donteatalone.azurewebsites.net/api/getcomments

Code example:

fetch(https://donteatalone.azurewebsites.net/api/getcomments)