2.0.0 • Published 2 years ago
mealviewerapi v2.0.0
A lightweight wrapper for the MealViewer API
Checkout the examples for ideas Submit your own ideas by creating a pull request
Finding your school
Find your school by going to MealViewer and search for your school.
The url will look like https://schools.mealviewer.com/school/{YourSchool}. take {YourSchool}, and put it in the Client constructor.
Changelog
v2.0
- Refactored return object again
+ {menu: [{lunch?: {}, etc...}], url?, date?, rawData?}
- {items: [{lunch?: {}, etc...}], url?, date?, rawData?}
- Changed urls
+ response.url => https://schools.mealviewer.com/school/{YourSchool}
- response.url => https://api.mealviewer.com/api/v4/school/{YourSchool}
+ response.apiURL => https://api.mealviewer.com/api/v4/school/{YourSchool}
- Now using class
+ new mv.Client(school, options?).get(date?)
- mv.get(school, date?, options?)
- Daily checking event
+ client.daily.on('newMenu', data => {})
- New return array/string to make it clearer what will be returned
+ new Client('mySchool', {return: ['date', 'url']})
- new Client('mySchool', {date?, url?})
- More return options
+ apiUrl, rawData
- Added menu types for intellisense
- node-fetch dependancy is now set to v2 instead of ^v2
- mealviewerapi is a CJS project, while node-fetch v3 is an ESM file making v3 unusable with CJS files
- Code Examples
v1.5
- get function now accepts start and end date
+ mv.get(school, {start?, end?})
- refactored return object
+ {items: [{lunch?: {}}, etc...], url?, date?, rawData?}
- {lunch?: {}, url?, date?, rawData?}