You need to have Python 2.7, urllib2 and Flask to run this program. To download packages using pip:
pip install urllib2
pip install Flask
Clone the repository.
Run the following command to run flask server on local machine.
FLASK_APP=script.py flask run
After a while you should be able to use the app at:
Strava (strava.com) is an online social platform for cyclers to record their rides and compare them with other users.
Using Strava API (https://strava.github.io/api/), find the most popular 10 cycling segments in Istanbul, and check their leaderboards (First 50). Return a dictionary of riders only in multiple leaderboards, and how many time they are listed in those leaderboards. (Endpoint 1)
Bonus: Calculate a score for each rider listed in those segments and return your highscore list. (Endpoint 2). Be creative and try to be fair with score calculation. Document which variables you are using for score calculation and the score formula.
-
Your application should be a web application. (Just an API backend)
-
You can use either Python 2 or Python 3
-
You can use any Python web framework and any Python library except stravalib
-
You can assume that this application will not receive high traffic.
-
Deliver your code to us as a (git) repository: we want to be able to see your commit history.
-
Remember, working code is one thing but we also look for clean design, patterns, and best practices. How advanced the final version will be is totally up to you.