-
Notifications
You must be signed in to change notification settings - Fork 0
API's page
Use this page to start creating an API of what end points the front end needs.
EX: URL "/tours/dailypage" JSON: {Tour:Boating Tour, Starttime:5:00pm}
- URL: "/tours"
- TYPE: "get"
- JSON:
[{title: "Event 1", time: "1/1/2016 3:00:00", groupId: 2342342}, {title: "Event 2", time: "1/1/2016 5:00:00", groupId: 2342342}] - RETURNS: All tours for company return status on tour
- URL: "/resources/{date}"
- TYPE: "get"
- JSON:
[{title: "Bus 1", events: [<array of upcoming events>], id: 2342342}, {title: "Bus 2", events: [<array of upcoming events>], id: 234sd342}] - RETURNS: All resources associated with your tours, and all resources you own return status on resource.
- URL: "/tour"
- TYPE: "post"
- To Server JSON: {owner: "Bob Smith", timeArrive: , timeLeave: , type: "Boat Plane Crab Overnight Tour", resources: {}}
- JSON Response: {response: (true/false)}
- Description: Add a tour.
- URL: "/addNewTourType"
- TYPE: "post"
- To Server JSON: {type: "Boat Plane Crab Overnight Tour"}
- JSON Response: {response: (true/false)}
- Description: Add a new type of tour.
-
URL: "/getAvailableTourTimes"
-
TYPE: "get"
-
To Server JSON: {time: SinceEpochToDate}
-
JSON Response:
[{title: "Boat and Crab Tour", resources: {<object with all the needed resources and their start and end times>}, id: 2342342}, {title: "Boat Tour", resources: {<object with all the needed resources and their start and end times>}, id: 234sd342}] -
Description: Client sends a specific day to the server. Return a list of tours that fit between existing tours for that day.
-
Give us a cruise ship and date and we give back possible times
- URL: "/getMessages"
- TYPE: "get"
- JSON Response:
[{author: "Bob Smith", timeAdded: <SinceEpochToDate>, message: "Hey everyone! lol.", id: 234sd342}, {author: "John Grey", timeAdded: <SinceEpochToDate>, message: "Bob, this is for important messages.", id: 234sd343}] - Description: Get all the messages added in the past week.
- URL: "/addMessages"
- TYPE: "post"
- To Server JSON: {author: "Bob Smith", message: "Hey everyone! lol."}
- JSON Response: {response: (true/false)}
- Description: Add a message.
Login Request: POST Url: api/login JSON: {username, password}
Create User Request: POST Url: api/user JSON: {user}
Get User Request: GET Url: api/user/userid
Update User Request: PUT Url: api/user JSON: {user}
Delete User Request: DELETE Url: api/user/userid