koroibos's People
koroibos's Issues
User story #3: GET api/v1/olympians?age=oldest
As a user,
I can make a GET request to the endpoint api/v1/olympians?age=oldest.
-
If the GET request is successful, I see a JSON response with the information of the oldest olympian.
-
Complete endpoint
-
Account for sad paths
-
Fully test endpoint
-
Feature deployed to Heroku
-
Request
GET api/v1/olympians?age=oldest
- Successful Response
{
[
{
"name": "Julie Brougham",
"team": "New Zealand",
"age": 62,
"sport": "Equestrianism"
"total_medals_won": 0
}
]
}
User Story #4: GET api/v1/olympian_stats
As a user,
I can make a GET request to api/v1/olympian_stats.
-
A successful GET request will return a JSON response
-
Complete endpoint
-
Account for sad paths
-
Fully tested
-
Deployed to Heroku
-
Request:
GET api/v1/olympian_stats
- Response
{
"olympian_stats": {
"total_competing_olympians": 3120
"average_weight:" {
"unit": "kg",
"male_olympians": 75.4,
"female_olympians": 70.2
}
"average_age:" 26.2
}
}
Setup Travis CI
User Story #5: GET api/v1/events
As a user,
I can make a GET request to the endpoint api/v1/events.
-If the GET request is successful, I see a JSON response with all events grouped by sport.
-
Complete endpoint
-
Account for sad paths
-
Fully tested
-
Deployed to Heroku
-
Request
GET api/v1/events
- Response
{
"events":
[
{
"sport": "Archery",
"events": [
"Archery Men's Individual",
"Archery Men's Team",
"Archery Women's Individual",
"Archery Women's Team"
]
},
{
"sport": "Badminton",
"events": [
"Badminton Men's Doubles",
"Badminton Men's Singles",
"Badminton Women's Doubles",
"Badminton Women's Singles",
"Badminton Mixed Doubles"
]
},
{...}
]
}
User Story #1: GET api/v1/olympians
As a user,
I can make a GET request to api/v1/olympians.
-
Complete endpoint
-
Account for sad paths
-
Fully tested
-
deployed to Heroku
-
A successful GET request will return a JSON response with all olympian records in the olympians table and will be formatted in the following way:
-
Request:
GET /api/v1/olympians
- Response
{
"olympians":
[
{
"name": "Maha Abdalsalam",
"team": "Egypt",
"age": 18,
"sport": "Diving"
"total_medals_won": 0
},
{
"name": "Ahmad Abughaush",
"team": "Jordan",
"age": 20,
"sport": "Taekwondo"
"total_medals_won": 1
},
{...}
]
}
Unsuccessful Response:
status: 500
{"error": "Unable to handle Request"}
Setup Database
-
Setup node Express.js app and create database with Olympians table and with attributes for name, sex, age, height, weight, team, games, sport, event, and medal.
-
Create README with information regarding database setup.
-
Complete functionality
-
Feature deployed to Heroku
-
Create README
User Story #6: GET api/v1/events/:id/medalists
As a user,
I can make a GET request to the endpoint api/v1/events/:id/medalists.
-
If GET request is successful, I see a JSON response with all olympians who have received a medal for that event
-
Complete endpoint
-
Account for sad paths
-
Fully Tested
-
Deployed to Heroku
-
Request
GET api/v1/events/:id/medalist
- Response
{
"event": "Badminton Mixed Doubles",
"medalists": [
{
"name": "Tontowi Ahmad",
"team": "Indonesia-1",
"age": 29,
"medal": "Gold"
},
{
"name": "Chan Peng Soon",
"team": "Malaysia",
"age": 28,
"medal": "Silver"
}
]
}
User Story #2: GET api/v1/olympians?age=youngest
As a user,
I can make a GET request to the endpoint api/v1/olympians?age=youngest.
-
If the GET request is successful, I see a JSON response with the information of the youngest olympian.
-
Complete endpoint
-
Account for sad paths
-
Fully test endpoint
-
Feature deployed to Heroku
-
Request
GET api/v1/olympians?age=youngest
- Successful Response
{
[
{
"name": "Ana Iulia Dascl",
"team": "Romania",
"age": 13,
"sport": "Swimming"
"total_medals_won": 0
}
]
}
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.