open-index/open-npm huggingface dataset:
npm package: @revolugo/revolugo-client-js
Description: Javascript Revolugo Booking API Client (browser + server)
Author: Revolugo
Latest version: 1.0.1
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# Revolugo Client Javascript
The Revolugo Client Javascript provides convenient access to the Revolugo API from
applications written in server-side JavaScript or for browser based applications

## Documentation

See the [`revolugo` API docs](https://api.revolugo.com/v1/swagger.json).
## Installation
```
 npm install @revolugo/revolugo-client-js --save
```

## Usage
### Import & Configure ###
#### Node ####
```js
const Revolugo = require('@revolugo/revolugo-client-js')

const revolugoClient = new Revolugo.ApiClient({
  apiKey: '<public-or-private-api-key-here>',
  apiVersion: 'v1',
  environment: Revolugo.Environment.SANDBOX
})
```
#### Browser && ES6 ####
```js
import * as Revolugo from '@revolugo/revolugo-client-js'

const revolugoClient = new Revolugo.ApiClient({
  apiKey: '<public-or-private-api-key-here>',
  apiVersion: 'v1',
  environment: Revolugo.Environment.SANDBOX
})
```

#### Confiugration ####

| Option              | Default            | Description                                                                                                                                                                                                                                       |
| ------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `apiKey`        | Required             | Public or Private Api Key provided by Revolugo 
| `environment`        | Required             | Target environment for the client (Environment.PRODUCTION \| Environment.SANDBOX)
| `version`       | Required    | Api version
### Simple Api calls ###
See the [`revolugo` API docs](https://api.revolugo.com/v1/swagger.json). for more details about inputs / outputs
```js
 const hotelOfferRequest = await revolugoClient.hotelOfferRequests.create({
    adult_count: 5,
    room_count: 3,
    check_in_date: '2021-05-30',
    check_out_date: '2021-06-02',
    latitude: 45.76405021831942,
    longitude: 4.835700988769532,
    source_market: 'FR'
 })
```
### Polling ###
Some calls require polling to see the complete output. Polling is already handled by the library
```js
revolugoClient.hotelOffers.list({
    hotel_offer_request_id: <request-id>,
    currency: 'EUR'
}, (err, result) => {
    if (err) {
      console.log("Error while Polling")
      handleError(err)
      return
    }
    if (result.meta.status === 'in-progress') {
        console.log("Still Polling")
        doSomething(result)
    } else {
        console.log("Done Polling")
        doSomething(result)
    }
})
```
npm package: @revolunet/test-api
Description: simple express server for deploy testing purposes
Author: Julien Bouquillon
Latest version: 1.0.0

# test-api

A simple express server for deploys testing purposes

## Usage

```sh
npm install -g @revolunet/test-api
test-api
```

Environnement variables :

 - `MESSAGE`: custom endpoint message
 - `PORT`: server port (default 3000)

## Related

 - docker image : http://github.com/revolunet/test-api-docker