By: Chimdi and Temi Adebowale
Welcome to Sportify, your go-to app for staying updated on upcoming and current sports matches hosted by Cornell University! Whether you're a passionate Cornell student hoping to support school spirit or just someone who loves the thrill of Cornell sports, this app is designed to keep you in the loop.
Sportify is an API that allows its clients to:
- Access a database storing Cornell University's home games, in which the client can view all current and future games or modify their search by selecting qualities that specific games might have in common (referred to as identifiers)
- Register, Login, and Lougout of an account using an inputted email and password
- Edit the Configuration of the Account (Adding Funds, Changing Username)
- Purchase tickets for one or more games
Data Models:
- Game Model, representing a sports match betweeen two universities
- User Model, represening a user to login and view the available games
- Ticket Model, representing a ticket to that is bought by a user for a specific sports game
- School Model, representing a university instituion that is participating in sports games
- Player Model, representing students that are apart of univierites sports roster
Model Relationships:
- Many-to-Many Relationship : Users and Games (Attending Users)
- Many-to-Many Relationship : Games and Players (Home Roster and Away Roster)
- One-to-Many Relationship : User and Tickets
- One-to-Many Relationship : Game and Tickets
- One-to-Many Relationship : School and Games (Home and Away Games)
<HTTP STATUS CODE 200>
[
{
"id": <GAME ID>,
"sport": <SPORT OF GAME>,
"sex": <SEX OF GAME>,
"date-time": <DATE-TIME OF GAME>,
"location": <LOCATION OF GAME>,
"away_team_logo": <LOGO OF AWAY TEAM OF GAME>,
"away_team_name": <NAME OF AWAY TEAM OF GAME>,
"num_tickets": <NUMBER OF TICKET REMAINING FOR GAME>,
"tickets": [<SERIALIZED TICKET>, ...],
"users_attending": [<SERIALIZED USER>, ...],
"home_roster": [<SERIALIZED PLayer>, ...],
"away_roster": [<SERIALIZED PLayer>, ...]
},
// Other Games Here
{},{},{}
]
<HTTP STATUS CODE 200>
[
{
"id": <GAME ID>,
"sport": <SPORT OF GAME>,
"sex": <SEX OF GAME>,
"date-time": <DATE-TIME OF GAME>,
"location": <LOCATION OF GAME>,
"away_team_logo": <LOGO OF AWAY TEAM OF GAME>,
"away_team_name": <NAME OF AWAY TEAM OF GAME>,
"num_tickets": <NUMBER OF TICKET REMAINING FOR GAME>,
"tickets": [<SERIALIZED TICKET>, ...],
"users_attending": [<SERIALIZED USER>, ...],
"home_roster": [<SERIALIZED PLayer>, ...],
"away_roster": [<SERIALIZED PLayer>, ...]
},
// Other Games Here
{},{},{}
]
<HTTP STATUS CODE 200>
[
{
"id": <GAME ID>,
"sport": <SPORT OF GAME>,
"sex": <SEX OF GAME>,
"date-time": <DATE-TIME OF GAME>,
"location": <LOCATION OF GAME>,
"away_team_logo": <LOGO OF AWAY TEAM OF GAME>,
"away_team_name": <NAME OF AWAY TEAM OF GAME>,
"num_tickets": <NUMBER OF TICKET REMAINING FOR GAME>,
"tickets": [<SERIALIZED TICKET>, ...],
"users_attending": [<SERIALIZED USER>, ...],
"home_roster": [<SERIALIZED PLayer>, ...],
"away_roster": [<SERIALIZED PLayer>, ...]
},
// Other Games Here
{},{},{}
]
<HTTP STATUS CODE 200>
{
"id": <GAME ID>,
"sport": <SPORT OF GAME>,
"sex": <SEX OF GAME>,
"date-time": <DATE-TIME OF GAME>,
"location": <LOCATION OF GAME>,
"away_team_logo": <LOGO OF AWAY TEAM OF GAME>,
"away_team_name": <NAME OF AWAY TEAM OF GAME>,
"num_tickets": <NUMBER OF TICKET REMAINING FOR GAME>,
"tickets": [<SERIALIZED TICKET>, ...],
"users_attending": [<SERIALIZED USER>, ...],
"home_roster": [<SERIALIZED PLayer>, ...],
"away_roster": [<SERIALIZED PLayer>, ...]
}
<HTTP STATUS CODE 200>
[
{
"id": <GAME ID>,
"sport": <SPORT OF GAME>,
"sex": <SEX OF GAME>,
"date-time": <DATE-TIME OF GAME>,
"location": <LOCATION OF GAME>,
"away_team_logo": <LOGO OF AWAY TEAM OF GAME>,
"away_team_name": <NAME OF AWAY TEAM OF GAME>,
"num_tickets": <NUMBER OF TICKET REMAINING FOR GAME>,
"tickets": [<SERIALIZED TICKET>, ...],
"users_attending": [<SERIALIZED USER>, ...]
},
// Other Games Here
{},{},{}
]
<HTTP STATUS CODE 201>
{
"id": <GAME ID>,
"sport": <SPORT OF GAME>,
"sex": <SEX OF GAME>,,
"date_time": <DATE-TIME OF GAME>,
"location": <LOCATION OF GAME>,
"away_team_logo": <LOGO OF AWAY TEAM OF GAME>,
"away_team_name": <NAME OF AWAY TEAM OF GAME>,
"num_tickets": <NUMBER OF TICKET REMAINING FOR GAME>,
"tickets": [<SERIALIZED TICKET>, ...],
"users_attending": [<SERIALIZED USER>, ...],
"home_roster": [<SERIALIZED PLayer>, ...],
"away_roster": [<SERIALIZED PLayer>, ...]
}
<HTTP STATUS CODE 201>
{
"id": <GAME ID>,
"sport": <SPORT OF GAME>,
"sex": <SEX OF GAME>,,
"date_time": <DATE-TIME OF GAME>,
"location": <LOCATION OF GAME>,
"away_team_logo": <LOGO OF AWAY TEAM OF GAME>,
"away_team_name": <NAME OF AWAY TEAM OF GAME>,
"num_tickets": <NUMBER OF TICKET REMAINING FOR GAME>,
"tickets": [<SERIALIZED TICKET>, ...],
"users_attending": [<SERIALIZED USER>, ...],
"home_roster": [<SERIALIZED PLayer>, ...],
"away_roster": [<SERIALIZED PLayer>, ...]
}
<HTTP STATUS CODE 200>
{
"id": <GAME ID>,
"sport": <SPORT OF GAME>,
"sex": <SEX OF GAME>,,
"date_time": <DATE-TIME OF GAME>,
"location": <LOCATION OF GAME>,
"away_team_logo": <LOGO OF AWAY TEAM OF GAME>,
"away_team_name": <NAME OF AWAY TEAM OF GAME>,
"num_tickets": <NUMBER OF TICKET REMAINING FOR GAME>,
"tickets": [<SERIALIZED TICKET>, ...],
"users_attending": [<SERIALIZED USER>, ...],
"home_roster": [<SERIALIZED PLayer>, ...],
"away_roster": [<SERIALIZED PLayer>, ...]
}
<HTTP STATUS CODE 200>
[
{
"id": <GAME ID>,
"sport": <SPORT OF GAME>,
"sex": <SEX OF GAME>,,
"date_time": <DATE-TIME OF GAME>,
"location": <LOCATION OF GAME>,
"away_team_logo": <LOGO OF AWAY TEAM OF GAME>,
"away_team_name": <NAME OF AWAY TEAM OF GAME>,
"num_tickets": <NUMBER OF TICKET REMAINING FOR GAME>,
"tickets": [<SERIALIZED TICKET>, ...],
"users_attending": [<SERIALIZED USER>, ...],
"home_roster": [<SERIALIZED PLayer>, ...],
"away_roster": [<SERIALIZED PLayer>, ...]
}
// Other Games Here
{},{},{}
]
<HTTP STATUS CODE 201>
{
"session_token": <USER SESSION TOKEN>,
"session_expiration": <DATE OF USER SESSION EXPIRATION>,
"refresh_token": <USER REFRESH TOKEN>
}
<HTTP STATUS CODE 200>
{
"session_token": <USER SESSION TOKEN>,
"session_expiration": <DATE OF USER SESSION EXPIRATION>,
"refresh_token": <USER REFRESH TOKEN>
}
<HTTP STATUS CODE 200>
{
"session_token": <USER SESSION TOKEN>,
"session_expiration": <DATE OF USER SESSION EXPIRATION>,
"refresh_token": <USER REFRESH TOKEN>
}
<HTTP STATUS CODE 200>
"You have been logged out"
<HTTP STATUS CODE 200>
{
"id": <USER ID>,
"username": <USER USERNAME>,
"email": <USER EMAIL>,
"balance": <USER BALANCE>
}
<HTTP STATUS CODE 201>
<USER UPDATED USERNAME>
<HTTP STATUS CODE 201>
<USER UPDATED BALANCE>
<HTTP STATUS CODE 201>
{
"id": <TICKKET ID>,
"cost": <TICKET COST>,
"user_id": <ID OF USER WHO PURCHASED TICKET>,
"game_id": <ID OF GAME TICKET IS ASSOCIATED WITH>
}
<HTTP STATUS CODE 201>
{
"id": <SCHOOL ID>,
"name": <SCHOOL NAME>,
"logo_image": <SCHOOL SPORTS LOGO>
}
<HTTP STATUS CODE 200>
{
"id": <SCHOOL ID>,
"name": <SCHOOL NAME>,
"logo_image": <SCHOOL SPORTS LOGO>
}
<HTTP STATUS CODE 200>
{
"id": <SCHOOL ID>,
"name": <SCHOOL NAME>,
"logo_image": <SCHOOL SPORTS LOGO>
}
<HTTP STATUS CODE 200>
[
{
"id": <SCHOOL ID>,
"name": <SCHOOL NAME>,
"logo_image": <SCHOOL SPORTS LOGO>
},
// Other Schools
{},{},{}
]
<HTTP STATUS CODE 201>
{
"id": <PLAYER ID>,
"name": <PLAYER NAME>,
"age": <PLAYER AGE>,
"picture": <PLAYER PROFILE PICTURE>,
"bio": <PLAYER BIO>
}
<HTTP STATUS CODE 201>
{
"id": <SCHOOL ID>,
"name": <SCHOOL NAME>,
"logo_image": <SCHOOL SPORTS LOGO>
}
Feel free to let us know if you would like us to include any other features to our app, or if there is something in our code that we could improve! Thank you for trying Sportify!