Restaurants

http://sfsuswe.com/~f15g16/api/restaurants/new.php
http://sfsuswe.com/~f15g16/api/restaurants/delete.php?restaurant_id=5
http://sfsuswe.com/~f15g16/api/restaurants/delete.php?restaurant_id=5
http://sfsuswe.com/~f15g16/api/restaurants/update.php
http://sfsuswe.com/~f15g16/api/restaurants/get.php?day=5&hour=22&query=San%20Francisco

         Get Restaurant

[{
    "id":"12123",
    "phone":"415 580 1405",
    "email":"elfarolito@gmail.com",
    "num_reviews":"6",
    "pricing":"5",
    "average_rating":"4", 
    "cuisine":"Mexican",
    "floorplan": "djfajdsfkljasdkfjals;kdjfsaf",
    "description": "One of the best restaurants in San Francisco",
    "location_country":"United States",
    "location_city":"San Francisco",
    "location_zipcode":"94121",
    "location_street":"Mission Street",
    "location_houseno":"50",
    "location_description":"1st floor"
}]

         Get Restaurants

[{
    "name":"El farolito",
    "restaurant_id":"12123",
    "phone":"415 580 1405",
    "email":"elfarolito@gmail.com",
    "num_reviews":"6",
    "pricing":"5",
    "average_rating":"4", 
    "cuisine":"Mexican",
    "floorplan": "djfajdsfkljasdkfjals;kdjfsaf",
    "description": "One of the best Mexican restaurants in San Francisco",
    "location_city":"San Francisco",
    "location_zip":"94107"
},{
    "name":"Shanghai Dumpling King",
    "id":"12124",
    "phone":"415 570 1405",
    "email":"dumplings@gmail.com",
    "num_reviews":"65",
    "pricing":"2",
    "average_rating":"5", 
    "cuisine":"Chinese",
    "floorplan": "djfajdsfkljasdkfjals;kdjfsaf",
    "description": "Chinese restaurant in SF",
    "location_city":"San Francisco",
    "location_zip":"94121"
},
{
    "name":"Grinders Pizzeria",
    "restaurant_id":"12126",
    "phone":"415 560 1405",
    "email":"grinders@gmail.com",
    "num_reviews":"2",
    "pricing":"5",
    "average_rating":"4", 
    "cuisine":"Italian",
    "floorplan": "djfajdsfkljasdkfjals;kdjfsaf",
    "description": "One of the best pizza restaurants in San Francisco",
    "location_city":"San Francisco",
    "location_zip":"94119"
}]

Reservation

http://sfsuswe.com/~f15g16/api/reservations/delete.php?reservation_id=122
[
    {
      "reservation_id":"160",
      "timeslot": "1447918153",
      "remark": "I am vegetarian!",
      "floorplan_location": "table_4",
      "showup": "false",
      "restaurant_id": "5"
    },
    {
      "reservation_id":"165",
      "timeslot": "1447918456",
      "remark": "I might run 5 minutes late",
      "floorplan_location": "table_1",
      "showup": "true",
      "restaurant_id": "8"
    },
    {
      "reservation_id":"199",
      "timeslot": "1447918888",
      "remark": "It's my birthday!",
      "floorplan_location": "table_3",
      "showup": "true",
      "restaurant_id": "6"
    }
]
http://sfsuswe.com/~f15g16/api/reservations/update.php

Reviews

http://sfsuswe.com/~f15g16/api/reservations/delete.php?reservation_id=122
[
    {
        "review_id": "5",
        "name":"Luke Skywalker",
        "review_time":12454564654,
        "number_of_stars": "5",
        "comment": "This was an amazing restaurant!, loved it!",
        "reservation_id": "1"
    },
    {
        "review_id": "6",
        "name":"Obi Wan Kenobi",
        "review_time":12454574654,
        "number_of_stars": "4",
        "comment": "This was good",
        "reservation_id": "6"
    },
    {
        "review_id": "7",
        "name":"Darth Vader",
        "review_time":12454574654,
        "number_of_stars": "1",
        "comment": "Worst dinner I've ever had.",
        "reservation_id": "5"
    }
]
http://sfsuswe.com/~f15g16/api/reservations/update.php

User

http://sfsuswe.com/~f15g16/api/user/me.php
{
    "user_id":"jens.vanderhaeghe@gmail.com",
    "first_name":"Jens",
    "last_name":"Vanderhaeghe",
    "role":"5",
    "phone":"415 580 1405"
}
//provided password is "hello123", always use PASSWORD_DEFAULT as 2nd option.

password_hash("hello123", PASSWORD_DEFAULT);

//Output: $2y$10$6CR.yQ.SJL5O/CRQpN4l/OPHCkkwho/fK5rf0/RmvjjGH40yFu7lm , store this in DB
http://sfsuswe.com/~f15g16/api/user/update.php
http://sfsuswe.com/~f15g16/api/user/promote.php

Authentication

 

http://sfsuswe.com/~f15g16/api/authenticate.php
401 - unauthorized.
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ey
JzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
G4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E
2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ

Opening Hours

 

http://sfsuswe.com/~f15g16/api/hours/new.php
401 - unauthorized.
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ey
JzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6Ikpva
G4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E
2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
http://sfsuswe.com/~f15g16/api/hours/new.php
[  
   {  
      "day_id":"0",
      "open_id":"135",
      "open_start":"10",
      "open_end":"20"
   },
   {  
      "day_id":"3",
      "open_id":"139",
      "open_start":"1",
      "open_end":"14"
   },
   {  
      "day_id":"5",
      "open_id":"15",
      "open_start":"8",
      "open_end":"12"
   }
]

Cuisines

http://sfsuswe.com/~f15g16/api/cuisine/get.php
[  
  "Thai",
  "Indian",
  "Hawaiian",
  "Italian",
  "Chinese",
  "Russian"
  "Korean",
  "French",
  "German",
  "New American"
  "Gourmet"
]

Restaurant Media

http://sfsuswe.com/~f15g16/api/media/get.php?restaurant_id=10
[  
   {  
      "media_id":"0",
      "restaurant_id":"10",
      "type":"thumbnail",
      "url":"http://mediaserver.tabletop.com/some_image.jpg"
   },
    {  
      "media_id":"1",
      "restaurant_id":"10",
      "type":"header",
      "url":"http://mediaserver.tabletop.com/test_image.png"
   },
   {  
      "media_id":"2",
      "restaurant_id":"10",
      "type":"menu",
      "url":"http://mediaserver.tabletop.com/menu.jpg"
   }
]
http://sfsuswe.com/~f15g16/api/media/new.php
http://sfsuswe.com/~f15g16/api/media/update.php

Restaurants

By Jens Vanderhaeghe

Restaurants

  • 838