Unofficial JavaScript implementation of the Takeaway.com API.
yarn add takeaway
- Banks
- CheckVoucher
- Config
- CreateAccount
- Discounts
- GeoLocation
- HistoryDetails
- LoyaltyPoints
- ImportOrder
- Menucard
- OnlinePaymentStatus
- Order
- OrderWithOnlinePayment
- RecurringPayment
- ResetPassword
- RestaurantData
- RestaurantList
- Reviews
- ServerTime
- URLs
- UserAddressList
- UserLogin
- UserOrderHistory
- VietnamDeliveryArea
import{Takeaway,TakeawayConfig}from'takeaway';import{inspect}from'util';(async()=>{try{// Initialize configuration// See `src/config.js` for defaultsconstconfig=newTakeawayConfig({language: 'nl',url: 'https://nl.citymeal.com/android/android.php'});// Initialize Takeaway APIconsttakeaway=newTakeaway(config);// Fetch countryconstcountry=awaittakeaway.getCountryById('NL');// Login to the country specific siteconstuser=awaitcountry.login('test@exampl.com','testpassword123');console.log(inspect(user,false,null));// Request restaurants list for areaconstrestaurants=awaitcountry.getRestaurants('7500','52.0000000','6.0000000');console.log(inspect(restaurants,false,null));}catch(err){console.error(err);}})();# Clone Git repository
git clone git@github.com:TakeawayAPI/node-takeaway.git
cd node-takeaway
# Install dependencies
yarn