zaidakram / expedia

Expedia is a ruby wrapper for EAN (Expedia Affiliate Network)
http://zaidakram.github.io/expedia/
MIT License
48 stars 29 forks source link

#<Expedia::APIError: Expedia::APIError> #17

Closed veekram closed 9 years ago

veekram commented 9 years ago

After upgrading to version to 0.0.5, I am getting the above mentioned error. The status response is 400. I am simply making request as:

list_api = Expedia.Api.new response = list_api.get_payment_info( {:hotelID => 172396)

Am not I supposed to get the response.body?

zaidakram commented 9 years ago

In case of any error a Expedia::APIError object is returned.

Are you using API in sandbox mode, with cid of 55505?

veekram commented 9 years ago

Yes I do. Is not that supposed to work with sandbox mode?

zaidakram commented 9 years ago

It should work in every mode. Just wanted to know if you are having issue in sandbox or live mode...

veekram commented 9 years ago

It was working fine with the prior version without any problems. I hope , there are some major changes on the expedia api and they must have changed the request URL too. I didnot find any docs related to changing to the URL though.

zaidakram commented 9 years ago

The gem first used api.ean.com. But then EAN introduced a separate dev api on dev.api.ean.com. But I think they discontinued it, or something. Some folks here were having issue with it but I wasn't. Now that you've reported it again, I was able to reproduce the issue. So reverting back to api.ean.com should work now.