Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

takeaway

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

takeaway

Unofficial JavaScript implementation of the Takeaway.com API.

  • 0.4.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

Node.js Takeaway.com API

Unofficial JavaScript implementation of the Takeaway.com API.

Installation

yarn add takeaway

Endpoints

  • 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 {inspect} from 'util';

import {Takeaway, TakeawayConfig} from 'takeaway';

(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
yarn

Keywords

FAQs

Package last updated on 28 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc