metu-menu
v0.0.2
Published
Middle East Technical University cafeteria menu fetcher.
Downloads
5
Readme
metu-menu
Fetches Middle East Technical University cafeteria's menu from its website.
Install
npm install --save metu-menu
Usage
Importing - ES6 (ES2015)
import metuMenu from 'metu-menu';
Importing - ES5
var metuMenu = require('metu-menu');
Fetching menu
The function expects one date
argument, if not provided it falls back to current date.
metuMenu('2016-05-24')
.then((menu) => {
console.log(menu.lunch);
console.log(menu.dinner);
console.log(menu.alacarte);
console.log(menu.socialBuilding)
})
.catch((error) => {
/* do something */
});
or to get today's menu without passing a date argument
metuMenu()
.then((menu) => {
console.log(menu.lunch);
console.log(menu.dinner);
console.log(menu.alacarte);
console.log(menu.socialBuilding)
})
.catch((error) => {
/* do something */
});
License
Copyright (c) 2016 H.Gökhan Sarı
Licensed under the MIT License.