# takeaway

> Unofficial JavaScript implementation of the Takeaway.com API.

Latest version **0.4.6** (published 2023-11-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install takeaway
pnpm add takeaway
yarn add takeaway
bun add takeaway
```

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.4.6 |
| Published | 2023-11-08 |
| First published | 2014-02-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 273.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 21 |
| Author | Danielle Huisman |
| Maintainers | danielhuisman, daniellehuisman |
| Keywords | takeaway, thuisbezorgd, food, api |

## Links

- npm: https://www.npmjs.com/package/takeaway
- Repository: https://github.com/TakeawayAPI/node-takeaway
- npm.io page: https://npm.io/package/takeaway

## Dependencies (1)

- [@rgrove/parse-xml](https://npm.io/package/@rgrove/parse-xml.md) ^4.1.0

## Recent versions

- 0.4.6 (latest) — 2023-11-08
- 0.4.5 — 2023-02-12
- 0.4.3 — 2023-02-12
- 0.4.2 — 2023-02-11
- 0.4.1 — 2020-02-28
- 0.4.0 — 2019-12-08
- 0.3.6 — 2019-11-23
- 0.3.5 — 2019-11-23
- 0.3.4 — 2019-08-15
- 0.3.3 — 2019-08-13
- 0.3.2 — 2018-12-20
- 0.3.1 — 2018-05-07
- 0.3.0 — 2018-05-07
- 0.2.0 — 2018-05-07
- 0.1.3 — 2018-05-07
- … 6 more at https://npm.io/package/takeaway/versions

## README

# Node.js Takeaway.com API

Unofficial JavaScript implementation of the [Takeaway.com](https://www.takeaway.com) API.

## Installation

```
yarn add takeaway
```

## Endpoints

-   [x] Banks
-   [ ] CheckVoucher
-   [x] Config
-   [ ] CreateAccount
-   [x] Discounts
-   [x] GeoLocation
-   [x] HistoryDetails
-   [x] LoyaltyPoints
-   [ ] ImportOrder
-   [x] Menucard
-   [ ] OnlinePaymentStatus
-   [ ] Order
-   [ ] OrderWithOnlinePayment
-   [ ] RecurringPayment
-   [x] ResetPassword
-   [x] RestaurantData
-   [x] RestaurantList
-   [x] Reviews
-   [x] ServerTime
-   [x] URLs
-   [x] UserAddressList
-   [x] UserLogin
-   [x] UserOrderHistory
-   [ ] VietnamDeliveryArea

## Example

```javascript
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

```bash
# Clone Git repository
git clone git@github.com:TakeawayAPI/node-takeaway.git
cd node-takeaway

# Install dependencies
yarn
```

---
_Source: https://npm.io/package/takeaway · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
