Lesson 10: Libraries and APIs (Slides)
Please review the following resources before lecture:
- What is CSV file (overview) (Video)
- Typescript Guide - Lesson 96 Reading CSV Files (Video)
- How to Parse / Read CSV File | Javascript & Node.js (Video)
- Complete Loading the Media Collection assignment.
- Do pre-work for lesson 11.
For this assignment, you are tasked with writing code to load data from a set of CSV files.
- Use the example loader file at libraries/src/loaders/anthony_mays_loader.ts to make your own unique copy of the loader.
- Implement the
loadMediaItems
method by loading the data from the data/media_items.csv file.
To try out the app with your loader, you can run the following command.
npm run compile
npm start -- --loader yourLoaderNameHere
Before submitting your work, be sure to run the tests.
npm run test
For additional credit on this assignment, combine the credits with the media items you loaded by modifying the loadData
method. You can test that you've loaded everything correctly by using this special command:
LOADER_NAME=yourLoaderNameHere npm run test