Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_instantly_available returns 404 #20

Open
sharipov-ru opened this issue Apr 21, 2016 · 3 comments
Open

set_instantly_available returns 404 #20

sharipov-ru opened this issue Apr 21, 2016 · 3 comments

Comments

@sharipov-ru
Copy link

There is an exception while using set_instantly_available client's method.
Routes says that it's supported only in Roomorama API 2.0, but since I'm using roomorama-api from master branch I think there should be a way to use it.

> roomorama_client.set_instantly_available({room_id: self.roomorama_id, instantly_available: true}) 

RoomoramaApi::NotFound: Error. HTTP status: 404. 
Response body: true from /Users/ruslansharipov/shared/rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/bundler/gems/roomorama-api-b7162a54acea/lib/roomorama_api/client.rb:104:in `prepare _response'
@rmascarenhas
Copy link
Contributor

Oh, right, I know why this is the case. There was a change in Roomorama's API. I will update the client soon and will let you know when it's fixed.

Thanks for reporting.

@sharipov-ru
Copy link
Author

@rmascarenhas thanks!

@sharipov-ru
Copy link
Author

It raises

KeyError: key{id} not found
from (pry):18:in `%'

because hash which was provided by client's set_instantly available is:

hash
=> {:room_id=>431583, :instantly_available=>true}

I changed room_id to be just id in PR for roomorama-postman here: https://github.com/roomorama/roomorama-postman/pull/53, please take a look when you'll have a time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants