0.4.6 • Published 2 years ago
takeaway v0.4.6
Node.js Takeaway.com API
Unofficial JavaScript implementation of the Takeaway.com API.
Installation
yarn add takeawayEndpoints
- Banks
- CheckVoucher
- Config
- CreateAccount
- Discounts
- GeoLocation
- HistoryDetails
- LoyaltyPoints
- ImportOrder
- Menucard
- OnlinePaymentStatus
- Order
- OrderWithOnlinePayment
- RecurringPayment
- ResetPassword
- RestaurantData
- RestaurantList
- Reviews
- ServerTime
- URLs
- UserAddressList
- UserLogin
- UserOrderHistory
- VietnamDeliveryArea
Example
import {Takeaway, TakeawayConfig} from 'takeaway';
import {inspect} from 'util';
(async () => {
    try {
        // Initialize configuration
        // See `src/config.js` for defaults
        const config = new TakeawayConfig({
            language: 'nl',
            url: 'https://nl.citymeal.com/android/android.php'
        });
        // Initialize Takeaway API
        const takeaway = new Takeaway(config);
        // Fetch country
        const country = await takeaway.getCountryById('NL');
        // Login to the country specific site
        const user = await country.login('test@exampl.com', 'testpassword123');
        console.log(inspect(user, false, null));
        // Request restaurants list for area
        const restaurants = await country.getRestaurants('7500', '52.0000000', '6.0000000');
        console.log(inspect(restaurants, false, null));
    } catch (err) {
        console.error(err);
    }
})();Development
Setup
# Clone Git repository
git clone git@github.com:TakeawayAPI/node-takeaway.git
cd node-takeaway
# Install dependencies
yarn0.4.6
2 years ago
0.4.5
3 years ago
0.4.3
3 years ago
0.4.2
3 years ago
0.4.1
6 years ago
0.4.0
6 years ago
0.3.6
6 years ago
0.3.5
6 years ago
0.3.4
6 years ago
0.3.3
6 years ago
0.3.2
7 years ago
0.3.1
7 years ago
0.3.0
7 years ago
0.2.0
7 years ago
0.1.3
7 years ago
0.0.0-a3
12 years ago
0.0.0-a2
12 years ago
0.0.0-a1
12 years ago
0.0.0-a
12 years ago
0.0.0
12 years ago
0.0.1
12 years ago