Skip to content

Latest commit

 

History

History

homework_02

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Train station departure board

train departure board

MBTA REST API

Massachusetts Bay Transportation Authority (MBTA) provides a public REST API.

The API reference can be found here.

For experimentation there is a swagger page.

Create a departure board

Use the predictions API:

https://api-v3.mbta.com/predictions?page%5Boffset%5D=0&page%5Blimit%5D=10&sort=-departure_time&filter%5Bstop%5D=place-north

Notes:

  • The prediction object shows the actual time or arrival and status
  • The schedule object shows the planned time
  • Use the vehicle object to get some of the train information like number, destination, etc.
  • You will need to manually map each prediction with the vehicle and schedule objects via their IDs

Where to upload the homework?

Create a app named xx_firstname_lastname the current django project (homework_02) where:

  • xx is your number in class
  • firstname is your first name
  • lastname is your last/family name

Example: 05_ivan_ivanov

When running the server and accessing it via the following url it should display the departure board.

Example: localhost:8000/05/ should open a page with the departure board

Important: Create a pull request with the changes to allow others to review the changes. Do not merge the PR before the code review deadline.

Code reviews

Student Reviewer 1 Reviewer 2
Alexander1022 Vladikolev0321 DeniBademi
AngelStoyanov33 marti456 Alexander1022
atanasatanasov03 Martincho2003 marto55
Vic-Dim AngelStoyanov33 Martincho2003
Vicktoria853 Ivan-Enchev Vladikolev0321
Vladikolev0321 atanasatanasov03 AngelStoyanov33
GerganaRoeva StelianRBG Vicktoria853
DeniBademi marto55 atanasatanasov03
elizadamgova Teodor1331 StelianRBG
Ivan-Enchev elizadamgova VayerMaking
Lilly7777 DeniBademi mvvrachev
mvvrachev Vicktoria853 elizadamgova
marto55 Vic-Dim Teodor1331
marti456 GerganaRoeva petardmnv
Martincho2003 Lilly7777 Ivan-Enchev
VayerMaking petardmnv Vic-Dim
petardmnv VayerMaking GerganaRoeva
StelianRBG Alexander1022 marti456
Teodor1331 mvvrachev Lilly7777

Try to show things that can be improved in the code, but also note the parts that you like. Aim at giving a balanced code review - state both the parts that are good and those that may be improved.

Deadline

Uploading the homework:

Sun, 24 Oct 2021 23:59:59 +0300

Doing the code reviews:

Tue, 26 Oct 2021 23:59:59 +0300

Merge the pull request:

Sun, 31 Oct 2021 23:59:59 +0300