Node.js Takeaway.com API
Unofficial JavaScript implementation of the Takeaway.com API.
Installation
yarn add takeaway
Endpoints
Example
import {Takeaway, TakeawayConfig} from 'takeaway';
import {inspect} from 'util';
(async () => {
try {
const config = new TakeawayConfig({
language: 'nl',
url: 'https://nl.citymeal.com/android/android.php'
});
const takeaway = new Takeaway(config);
const country = await takeaway.getCountryById('NL');
const user = await country.login('test@exampl.com', 'testpassword123');
console.log(inspect(user, false, null));
const restaurants = await country.getRestaurants('7500', '52.0000000', '6.0000000');
console.log(inspect(restaurants, false, null));
} catch (err) {
console.error(err);
}
})();
Development
Setup
git clone git@github.com:TakeawayAPI/node-takeaway.git
cd node-takeaway
yarn