npm package: @lodgea/lodgea-js
Description: LODGEA_SDK_for_javascript__Check_out_https__docs_lodgea_io_for_more_information_
Latest version: 1.2.0

# lodgea_js

LodgeaJs - JavaScript client for lodgea_js
LODGEA SDK for javascript. Check out https://docs.lodgea.io for more information.
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.2.0
- Package version: 1.2.0
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

## Installation

### For [Node.js](https://nodejs.org/)

#### npm

To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages).

Then install it via:

```shell
npm install lodgea_js --save
```

Finally, you need to build the module:

```shell
npm run build
```

##### Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run:

```shell
npm install
```

Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`:

```shell
npm link
```

To use the link you just defined in your project, switch to the directory you want to use your lodgea_js from, and run:

```shell
npm link /path/to/<JAVASCRIPT_CLIENT_DIR>
```

Finally, you need to build the module:

```shell
npm run build
```

#### git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID
then install it via:

```shell
    npm install GIT_USER_ID/GIT_REPO_ID --save
```

### For browser

The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following
the above steps with Node.js and installing browserify with `npm install -g browserify`,
perform the following (assuming *main.js* is your entry file):

```shell
browserify main.js > bundle.js
```

Then include *bundle.js* in the HTML pages.

### Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error:
Cannot resolve module", most certainly you should disable AMD loader. Add/merge
the following section to your webpack config:

```javascript
module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}
```

## Getting Started

Please follow the [installation](#installation) instruction and execute the following JS code:

```javascript
var LodgeaJs = require('lodgea_js');

var defaultClient = LodgeaJs.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['apiKey'] = "Token"

var api = new LodgeaJs.DefaultApi()
var opts = {
  'inlineObject1': new LodgeaJs.InlineObject1() // {InlineObject1} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.availabilitySearchPost(opts, callback);

```

## Documentation for API Endpoints

All URIs are relative to *https://api.eu.lodgea.io/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*LodgeaJs.DefaultApi* | [**availabilitySearchPost**](docs/DefaultApi.md#availabilitySearchPost) | **POST** /availability/search | Search for availability
*LodgeaJs.DefaultApi* | [**locationSearchPost**](docs/DefaultApi.md#locationSearchPost) | **POST** /location/search | Search for location
*LodgeaJs.DefaultApi* | [**propertiesGet**](docs/DefaultApi.md#propertiesGet) | **GET** /properties | List (filtered) properties
*LodgeaJs.DefaultApi* | [**propertiesPropertyIdAvailabilityGet**](docs/DefaultApi.md#propertiesPropertyIdAvailabilityGet) | **GET** /properties/{propertyId}/availability | Get a properties availability
*LodgeaJs.DefaultApi* | [**propertiesPropertyIdGet**](docs/DefaultApi.md#propertiesPropertyIdGet) | **GET** /properties/{propertyId} | Get a properties details


## Documentation for Models

 - [LodgeaJs.InlineObject](docs/InlineObject.md)
 - [LodgeaJs.InlineObject1](docs/InlineObject1.md)
 - [LodgeaJs.InlineResponse200](docs/InlineResponse200.md)
 - [LodgeaJs.InlineResponse2001](docs/InlineResponse2001.md)
 - [LodgeaJs.InlineResponse2001AttractionList](docs/InlineResponse2001AttractionList.md)
 - [LodgeaJs.InlineResponse2001Distance](docs/InlineResponse2001Distance.md)
 - [LodgeaJs.InlineResponse2001Geo](docs/InlineResponse2001Geo.md)
 - [LodgeaJs.InlineResponse2001GeoLocation](docs/InlineResponse2001GeoLocation.md)
 - [LodgeaJs.InlineResponse2001List](docs/InlineResponse2001List.md)
 - [LodgeaJs.InlineResponse2001LowestPrice](docs/InlineResponse2001LowestPrice.md)
 - [LodgeaJs.InlineResponse2001MediaList](docs/InlineResponse2001MediaList.md)
 - [LodgeaJs.InlineResponse2002](docs/InlineResponse2002.md)
 - [LodgeaJs.InlineResponse2002List](docs/InlineResponse2002List.md)
 - [LodgeaJs.InlineResponse2003](docs/InlineResponse2003.md)
 - [LodgeaJs.InlineResponse2003PolicyInfo](docs/InlineResponse2003PolicyInfo.md)
 - [LodgeaJs.InlineResponse2003PolicyInfoFeePolicyList](docs/InlineResponse2003PolicyInfoFeePolicyList.md)
 - [LodgeaJs.InlineResponse2003PolicyInfoTaxPolicyList](docs/InlineResponse2003PolicyInfoTaxPolicyList.md)
 - [LodgeaJs.InlineResponse2003PricingList](docs/InlineResponse2003PricingList.md)
 - [LodgeaJs.InlineResponse2003ProductList](docs/InlineResponse2003ProductList.md)
 - [LodgeaJs.InlineResponse2003Property](docs/InlineResponse2003Property.md)
 - [LodgeaJs.InlineResponse2003PropertyAddressList](docs/InlineResponse2003PropertyAddressList.md)
 - [LodgeaJs.InlineResponse2003PropertyAwardList](docs/InlineResponse2003PropertyAwardList.md)
 - [LodgeaJs.InlineResponse2003PropertyCancellationGracePeriod](docs/InlineResponse2003PropertyCancellationGracePeriod.md)
 - [LodgeaJs.InlineResponse2003PropertyCancellationPolicyList](docs/InlineResponse2003PropertyCancellationPolicyList.md)
 - [LodgeaJs.InlineResponse2003PropertyContactList](docs/InlineResponse2003PropertyContactList.md)
 - [LodgeaJs.InlineResponse2003PropertyFacilityInfo](docs/InlineResponse2003PropertyFacilityInfo.md)
 - [LodgeaJs.InlineResponse2003PropertyFacilityInfoAmenityList](docs/InlineResponse2003PropertyFacilityInfoAmenityList.md)
 - [LodgeaJs.InlineResponse2003PropertyFacilityInfoGuestRoomList](docs/InlineResponse2003PropertyFacilityInfoGuestRoomList.md)
 - [LodgeaJs.InlineResponse2003PropertyFacilityInfoMediaList](docs/InlineResponse2003PropertyFacilityInfoMediaList.md)
 - [LodgeaJs.InlineResponse2003PropertyFacilityInfoMessageList](docs/InlineResponse2003PropertyFacilityInfoMessageList.md)
 - [LodgeaJs.InlineResponse2003PropertyFeePolicyList](docs/InlineResponse2003PropertyFeePolicyList.md)
 - [LodgeaJs.InlineResponse2003PropertyGuaranteePolicy](docs/InlineResponse2003PropertyGuaranteePolicy.md)
 - [LodgeaJs.InlineResponse2003PropertyGuestInfo](docs/InlineResponse2003PropertyGuestInfo.md)
 - [LodgeaJs.InlineResponse2003PropertyMediaList](docs/InlineResponse2003PropertyMediaList.md)
 - [LodgeaJs.InlineResponse2003PropertyOperationTimeList](docs/InlineResponse2003PropertyOperationTimeList.md)
 - [LodgeaJs.InlineResponse2003PropertyPetsPolicy](docs/InlineResponse2003PropertyPetsPolicy.md)
 - [LodgeaJs.InlineResponse2003PropertyPolicyList](docs/InlineResponse2003PropertyPolicyList.md)
 - [LodgeaJs.InlineResponse2003PropertyPropertyInfo](docs/InlineResponse2003PropertyPropertyInfo.md)
 - [LodgeaJs.InlineResponse2003PropertyPropertyInfoAcceptedPaymentList](docs/InlineResponse2003PropertyPropertyInfoAcceptedPaymentList.md)
 - [LodgeaJs.InlineResponse2003PropertyPropertyInfoMessageList](docs/InlineResponse2003PropertyPropertyInfoMessageList.md)
 - [LodgeaJs.InlineResponse2003PropertyRecordCreated](docs/InlineResponse2003PropertyRecordCreated.md)
 - [LodgeaJs.InlineResponse2003PropertyRecordModified](docs/InlineResponse2003PropertyRecordModified.md)
 - [LodgeaJs.InlineResponse2003PropertyServiceList](docs/InlineResponse2003PropertyServiceList.md)
 - [LodgeaJs.InlineResponse2003PropertyTaxPolicyList](docs/InlineResponse2003PropertyTaxPolicyList.md)
 - [LodgeaJs.InlineResponse2003RatePlanList](docs/InlineResponse2003RatePlanList.md)
 - [LodgeaJs.InlineResponse2004](docs/InlineResponse2004.md)
 - [LodgeaJs.InlineResponse2004AvailabilityList](docs/InlineResponse2004AvailabilityList.md)
 - [LodgeaJs.InlineResponse2004PricingList](docs/InlineResponse2004PricingList.md)
 - [LodgeaJs.InlineResponse2004RatePlanList](docs/InlineResponse2004RatePlanList.md)
 - [LodgeaJs.InlineResponse200List](docs/InlineResponse200List.md)
 - [LodgeaJs.InlineResponse400](docs/InlineResponse400.md)
 - [LodgeaJs.InlineResponse4001](docs/InlineResponse4001.md)
 - [LodgeaJs.InlineResponse4001ValidationErrors](docs/InlineResponse4001ValidationErrors.md)
 - [LodgeaJs.InlineResponse400ValidationErrors](docs/InlineResponse400ValidationErrors.md)


## Documentation for Authorization



### ApiKeyAuth


- **Type**: API key
- **API key parameter name**: apiKey
- **Location**: HTTP header