Skip to content

Instantly share code, notes, and snippets.

@Drenerdo
Last active December 9, 2015 19:11
Show Gist options
  • Save Drenerdo/fc09e7ad2743e00de16f to your computer and use it in GitHub Desktop.
Save Drenerdo/fc09e7ad2743e00de16f to your computer and use it in GitHub Desktop.
Matilda Mirror DB setup
Matilda API
=== Init ===
GET settings -> {
minimumAllowableVersion : String (e.g. "1.0.0.1"),
currentAPIVersion : number
aboutURL : String,
privacyURL : String,
termsURL : String,
supportURL : String
}
=== RFID ==
RFID object:
{
id: int,
tag_id: int,
tag_name: string
}
=== User ===
User object:
{
id : int,
first_name : string,
last_name : string,
email : string,
dob : date,
gender : string
measurements : {
head : int,
chest : int,
waist : int,
hip : int,
inline : int,
leg : int,
feet : int // Is this assumed to be US sizing?
},
facebookToken : String
spotifyToken : String
creditCardToken : String // This is going to have to connect to authorize.net or some such.
googleCalendarToken : String
}
APIs:
POST login(email:String, p:String) -> User
POST signup(email:String, p:String, birthdate:Date, meausurements:{}) -> User
POST forgotPassword(email:String)\
POST logout() -> success : BOOL
PUT user(user:User) -> User // This allows us to modify the user's data
GET user(userId:number) -> User
=== Room ===
Room object:
{
roomId : int,
mirrorUDID : int
hotelName : string,
roomNumber : int,
amenities : {} // dictionary of amenities
}
GET room(roomId:number) -> Room
POST preCheckin(amenities:{}) -> {
success : BOOL,
room : Room
}
POST checkin(mirrorUDID:String) -> {
success : BOOL,
room : Room
} // The udid will be derived from the QR code on the mirror.
POST checkout()
=== Features ===
== Music ==
POST selectPlaylist(playlistId:number)
POST skipCurrentTrack()
POST pauseCurrentTrack()
POST playCurrentTrack()
// This should likely be handled with a socket connection, but if not, we can poll regularly from the device:
GET currentTrack() -> spotifyTrackId
GET currentPlaybackTime -> number
== Shoping ==
// This is TBD, but based on the Downtown Chic idea, I believe this could, on the iOS end, simply be one API endpoint that provides a URL to the html-rendered story, and that page itself will handle setting up transactions in the backend.
GET currentFashionStory(userID:number) -> {
fashionStoryURL : String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment