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

film genre and alternate_ids not working properly #5

Closed
RoyalTS opened this issue Mar 11, 2012 · 4 comments
Closed

film genre and alternate_ids not working properly #5

RoyalTS opened this issue Mar 11, 2012 · 4 comments
Assignees

Comments

@RoyalTS
Copy link
Contributor

RoyalTS commented Mar 11, 2012

For a project of mine I need the genres and the IMDB ID associated with movies. The API returns both, but bf.movies.search_by_name("Hackers")[0].genres just returns nil and bf.movies.search_by_name("Hackers")[0].alternate_ids throws a NoMethodError.

@brianmichel
Copy link
Owner

I'll investigate this today for you!

@ghost ghost assigned brianmichel Mar 11, 2012
@brianmichel
Copy link
Owner

@RoyalTS try using the .info on the end, like this bf.movies.search_by_name("Hackers")[0].info , it should contain all of the info you need. The way their api is structured you get a limited set of info back for a search, then you have to make a detailed call for for more info. I'll checkout if there is a way to get ALL of the information by passing a flag or something.

@RoyalTS
Copy link
Contributor Author

RoyalTS commented Mar 11, 2012

@brianmichel Thank you very much! .info indeed gets the job done.

As for making all information available via method calls to BadFruit::Movie, couldn't this be done with the same method_missing magic that Rails makes so much use of (http://kconrails.com/2010/12/21/dynamic-methods-in-ruby-with-method_missing/)?

@brianmichel
Copy link
Owner

Not a bad idea at all, I have to make some changes anyway (looks like there are more cool features of their API) as well as write REAL documentation :) So I'll see what I can do with the dynamic methods.

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