<commit_before>h1. Expedia !https://travis-ci.org/zaidakram/expedia.svg?branch=master(Expedia)!:https://travis-ci.org/zaidakram/expedia !https://badge.fury.io/rb/expedia.svg!:http://badge.fury.io/rb/expedia

Expedia is a ruby wrapper for ["EAN - Expedia Affiliate Network":http://www.expediaaffiliate.com] APIs.

Other details of this gem are:

* It uses the the latest verion of the EAN API. i.e ["Version 3":http://developer.ean.com/docs/api-change-log]
* Only REST API support (No XML or SOAP support)
* It uses Signature Pro method for Authentication. See ["Live API Key Authentication and Access":http://developer.ean.com/docs/getting-started/authentication/]

h2. Installation

For Rails Add this line to your application's Gemfile:

<pre>
gem 'expedia'
</pre>

And then execute:

<pre>
$ bundle
</pre>

Or install it yourself as:

<pre>
$ gem install expedia
</pre>

Either you can configure Expedia in code on run-time

<pre>
Expedia.cid = 55505
Expedia.api_key = 'your_api_key'
Expedia.shared_secret = 'your_shared_secret'
Expedia.locale = 'en_US'
Expedia.currency_code = 'USD'
Expedia.minor_rev = 13
</pre>

Or you can execute the following command to create an intializer (if you are using rails)

<pre>
$ rails g expedia:initialize
</pre>

h2. Usage

After configuring keys, default locale, currency and minor_rev for EAN use
<commit_msg>Added configuration of timeouts in README<commit_after>h1. Expedia !https://travis-ci.org/zaidakram/expedia.svg?branch=master(Expedia)!:https://travis-ci.org/zaidakram/expedia !https://badge.fury.io/rb/expedia.svg!:http://badge.fury.io/rb/expedia

Expedia is a ruby wrapper for ["EAN - Expedia Affiliate Network":http://www.expediaaffiliate.com] APIs.

Other details of this gem are:

* It uses the the latest verion of the EAN API. i.e ["Version 3":http://developer.ean.com/docs/api-change-log]
* Only REST API support (No XML or SOAP support)
* It uses Signature Pro method for Authentication. See ["Live API Key Authentication and Access":http://developer.ean.com/docs/getting-started/authentication/]

h2. Installation

For Rails Add this line to your application's Gemfile:

<pre>
gem 'expedia'
</pre>

And then execute:

<pre>
$ bundle
</pre>

Or install it yourself as:

<pre>
$ gem install expedia
</pre>

Either you can configure Expedia in code on run-time

<pre>
Expedia.cid = 55505
Expedia.api_key = 'your_api_key'
Expedia.shared_secret = 'your_shared_secret'
Expedia.locale = 'en_US'
Expedia.currency_code = 'USD'
Expedia.minor_rev = 13
# Optional configuration...
Expedia.timeout = 1 # read timeout in sec
Expedia.open_timeout = 1 # connection timeout in sec
</pre>

Or you can execute the following command to create an intializer (if you are using rails)

<pre>
$ rails g expedia:initialize
</pre>

h2. Usage

After configuring keys, default locale, currency and minor_rev for EAN use

{'fraction_non_alphanumeric': 0.11294282707821816, 'fraction_numerical': 0.008418098912662224, 'mean_word_length': 4.5703125, 'pattern_counts': {'":': 6, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1593740', 'n_tokens_mistral': 1047, 'n_tokens_neox': 962, 'n_words': 309}