open-index/open-npm huggingface dataset:
npm package: @laqlaq/sdk
Description: [Laqlaq Delivery Service](https://laqlaq.delivery)
Author: Laqlaq Admin
Latest version: 0.1.0

# Lalaq SDK

[Laqlaq Delivery Service](https://laqlaq.delivery)

## Installation

npm install --save @laqlaq/sdk

## Usage

### Initialization

When creating a new api caller instance, it should be provided api `key` and `version`, the `baseUrl` is optional and refers by default to Laqlaq production api endpoint.

```typescript
import { LaqlaqApi } from '@laqlaq/sdk';
let laqlaq = new LaqlaqApi({
  key: 'secret_key', // provided by Laqlaq
  version: 0 // or any available api version you want to use
});
```

### Calling Endpoints

All resources are available under the `LaqlaqApi` instance.

#### Orders

##### Create

```typescript
const newOrder = {
  source: {
    name: 'أحمد',
    location: 'البرامكة',
    phoneNumber: '0999999999'
  },
  destination: {
    name: 'ماجد',
    location: 'المزة',
    phoneNumber: '0988888888'
  },
  item: {
    description: 'فلاشة ديسك مان حمرا 16 غيغا',
    price: 10000
  }
};

laqlaq.create(newOrder);
```