Coder Social home page Coder Social logo

Comments (12)

druzn3k avatar druzn3k commented on September 7, 2024 1

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.

samuelebistoletti avatar samuelebistoletti commented on September 7, 2024

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.

joshkremer avatar joshkremer commented on September 7, 2024

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.

samuelebistoletti avatar samuelebistoletti commented on September 7, 2024

What method are you calling with param page?

from themoviedb-api.

joshkremer avatar joshkremer commented on September 7, 2024

Here is what I'm trying:

toprated = Tmdb::Movie.top_rated page: 2
puts toprated

from themoviedb-api.

samuelebistoletti avatar samuelebistoletti commented on September 7, 2024

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.

joshkremer avatar joshkremer commented on September 7, 2024

Interesting. I'm running ruby 2.2.1p85. I have updated all of my gems and still have the same problem.

from themoviedb-api.

samuelebistoletti avatar samuelebistoletti commented on September 7, 2024

Ok, Ruby version should be ok. Can you please send me the full stack trace of the exception raised?

from themoviedb-api.

joshkremer avatar joshkremer commented on September 7, 2024

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.

samuelebistoletti avatar samuelebistoletti commented on September 7, 2024

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.

joshkremer avatar joshkremer commented on September 7, 2024

Absolutely, here you go: https://gist.github.com/joshkremer/77ca70119a6086822d10a3f8d8734b11

from themoviedb-api.

joshkremer avatar joshkremer commented on September 7, 2024

That was it! Thanks so much for the help!

from themoviedb-api.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.