Comments (12)
I just tryed too and I get the expected results.
~/workspace/ruby/scripts $ ruby -v
> ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
~/workspace/ruby/scripts $ ruby tmdb_issue_4_ruby_2.1.1.rb
> #<Tmdb::Movie page=2, results=[#<Tmdb::Movie poster_path="/yRXTVpDRBA3983C3HjoY0SO4dV6.jpg", [...]
But I had to correct the require
, as it wasn't loading the correct gem, themoviedb-api
, but it was loading themoviedb
. Those are two different gems, with two different interfaces (but similar class names): themoviedb and themoviedb-api.
Hope this solves the mistery! 👍
from themoviedb-api.
Thanks. You can pass the param "page" to all methods that supports such paramater, for example you could write
Tmdb::Movie.popular page: 2
to get the second page of results.
from themoviedb-api.
Thanks for the reply. I'm unable to make that work. I receive a "wrong number of arguments (1 for 0)" error. Is there something I need to set up first?
from themoviedb-api.
What method are you calling with param page?
from themoviedb-api.
Here is what I'm trying:
toprated = Tmdb::Movie.top_rated page: 2
puts toprated
from themoviedb-api.
I tried the same exact call and it's working for me, no exeception is raised.
Are you using the last available version of the gem? What ruby version are you on?
from themoviedb-api.
Interesting. I'm running ruby 2.2.1p85. I have updated all of my gems and still have the same problem.
from themoviedb-api.
Ok, Ruby version should be ok. Can you please send me the full stack trace of the exception raised?
from themoviedb-api.
Sure, is this what you are looking for?
/Users/joshkremer/.rvm/gems/ruby-2.2.1/gems/themoviedb-1.0.1/lib/themoviedb/movie.rb:71:in `top_rated': wrong number of arguments (1 for 0) (ArgumentError)
from rebuild.rb:10:in `<main>'
from themoviedb-api.
Yes. As I can see from this output the error seams to be on line 10 of
rebuild.rb, maybe you are calling the method on tmdb gem from that file in
the wrong way. I tried from irb and top_rated method works as usual. Can
you publish a short gist of your code in order to reproduce the problem?
Il 05 apr 2016 14:03, "joshkremer" [email protected] ha scritto:
Sure, is this what you are looking for?
/Users/joshkremer/.rvm/gems/ruby-2.2.1/gems/themoviedb-1.0.1/lib/themoviedb/movie.rb:71:in
top_rated': wrong number of arguments (1 for 0) (ArgumentError)
from rebuild.rb:10:in
'—
You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#4 (comment)
from themoviedb-api.
Absolutely, here you go: https://gist.github.com/joshkremer/77ca70119a6086822d10a3f8d8734b11
from themoviedb-api.
That was it! Thanks so much for the help!
from themoviedb-api.
Related Issues (12)
- Update gem version in Rubygems HOT 1
- Any example using themoviedb-api HOT 2
- return all tv shows at once HOT 1
- Movie search issue / question HOT 2
- not working with ruby 2.7.0 HOT 8
- Get Movies By Release Date Range HOT 1
- Endpoint returning TV episodes for TV season searches and vice versa
- Cache Configuration HOT 2
- Use the append_to_response capability of the API? HOT 2
- Update gem version in Rubygems HOT 3
- People search sometimes fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from themoviedb-api.