Skip to content

Instantly share code, notes, and snippets.

@projectxcappe
Last active June 28, 2018 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save projectxcappe/a9fc1d0877e133c912e9051771f3d6d2 to your computer and use it in GitHub Desktop.
Save projectxcappe/a9fc1d0877e133c912e9051771f3d6d2 to your computer and use it in GitHub Desktop.
API_Doc.swift
//Login
Login {
let email: String
let fb_id: String //when fb is implemented
let password: String
let password_reset_code: String
let phone_number: String
let user_id: String
}
//Sign Out
SignOut {
}
//Sign Up
SignUp {
let token: String
}
//returns a token, saved in defaults = "api_token"
//which you need for 1) order history, 2) making orders, 3) getting the stripe key for the payment flow
//Password
ForgotPassword {
let email: String
}
//Venue and Places and Menu
Venue //Like Pepsi Center
{
let longitude: Double
let latitude: Double
let venue_id: Int
let venue_tax_rate: Double
let name: String
let places_count: Int
let address: String
let close_time: String
let open_time: String
let phone_number: String
let image: URL
let venue_map: URL
}
Place //Like Concession Stand
{
let venue_id: String
let place_id: String
let est_venue_order_time: String
let longitude: Double
let latitude: Double
let name: String
let description: String
let image: URL
let open_time: String
let close_time: String
let location: String //113, 127 etc sections or whatever it is for the venue
let menu: [Category]
}
//Currently not implented or used
// Category //Like Burgers, Desserts, Salads...
// {
// let category: String
// let food: [Food]
// }
Food //Like Popcorn
{
let food_id: String
let name: String
let description: String
let price: Double
let image: String
}
//Order
AddOrder {
let order_id: Int
let user_id: Int
let venue_id: Int
let time: String //Date
let total: Double
let order_detail: [Item]
}
Item {
let food_id: Int
let price: Double
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment