Giter Club home page Giter Club logo

tvdb_party's Introduction

TvdbParty!

What?

TvdbParty is a simple Ruby library to talk to thetvdb.com database.

Install

sudo gem install tvdb_party

TvdbParty is hosted on Gemcutter

gem install tvdb_party

How?

set up the client
tvdb = TvdbParty::Search.new("YOURAPIKEY")

search for your series
results = tvdb.search('the west wing')

get the series
west_wing = tvdb.get_series_by_id(results["seriesid"])
puts west_wing.name
=> The West Wing

get an episode
episode_22 = west_wing.get_episode(1, 22)
puts episode_22.name
=> What Kind of Day Has It Been?

get series fanart โ€“ pass in your language
puts west_wing.fanart('en').first.url
=> http://thetvdb.com/banners/fanart/original/72521-2.jpg

get series posters
puts west_wing.posters('en').first.url
=> http://thetvdb.com/banners/posters/72521-1.jpg

get series banners
puts west_wing.series_banners('en').first.url
=> http://thetvdb.com/banners/graphical/189-g.jpg

get season posters
puts west_wing.season_posters(2, 'en').first.url
=> http://thetvdb.com/banners/seasons/72521-2.jpg

Thanks

Thanks to thetvdb.com for their awesome database allowing us to meta out to our hearts consent.

Project name graciously stolen from jduff/tmdb_party.

tvdb_party's People

Contributors

brianmario avatar derobo avatar maddox avatar matsimitsu avatar mfilej avatar nixterrimus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tvdb_party's Issues

TypeError: can't convert String into Integer when using get_series_by_id

When trying your sample code, the first few steps work just fine. Once I get to the step with west_wing = tvdb.get_series_by_id(results["seriesid"]), it get the error TypeError: can't convert String into Integer. I'm running ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin10.8.0]. I've also tried several other searches that result in the same error.

TypeError: no marshal_dump is defined for class Proc

With both ruby 1.8.7 and 1.9.3-p194 I get the following error (after "results = tvdb.search('the west wing')") when trying the example in the README file.

Why is this happening? As far as I could google it, it has to do with a Proc that can't be serialized.
Can this be fixed easily?

TypeError: no marshal_dump is defined for class Proc
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:210:in `dump'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:210:in `set'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:210:in `open'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:210:in `set'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:120:in `set'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:93:in `get_with_caching'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/httparty_icebox.rb:101:in `get'
    from /Library/Ruby/Gems/1.8/gems/tvdb_party-0.6.2/lib/tvdb_party/search.rb:16:in `search'

Thanks,
Thomas

get_seasons

there is no method "get_seasons"

NoMethodError: undefined method `get_seasons' for #TvdbParty::Search:0x007ffa4708f518

api requests from heroku

Hello! I really appreciate the hard work put into this gem! But, I'm having some issues using this gem on a new project. The api requests work perfectly from my local machine, but when I try to use my site up on Heroku it will only connect sporadically.

I open up my connection to tvdb like it says in the readme

tvdb = TvdbParty::Search.new("MY_KEY")

and then I use this to allow a user to search by filling in a search box

results = tvdb.search(params[:Search]

Then, I use what they searched for to return the right results

show = tvdb.get_series_by_id(params[:series_id])

Am I doing something wrong? Is this a know issue with Heroku?

Don't use 'puts' in rescue in episode.initialize

I think it is very inconvenient to output a string in the rescue clause in episode.initialize

I have overridden this in one of my scripts by setting @air_date to nil instead.
Otherwise there is no way to get rid of this output.

Is there a reason, why @air_date is not just set to nil instead? (This can be tested in a script, in contrast to just living with some garbage output otherwise)

BTW, this happens for shows that have show specials for example, which don't have dates set.

How to get last episode of a series?

I'm trying something like this:

tvdbshow = tvdb.get_series_by_id(id)
lastshow = tvdbshow.episodes.last
pp lastshow

However, it looks like it's giving me the first show of the series. Any suggestions? Thanks!

banners, posters and fanart id

Hi, first thanks for the library.

I was using the original tvdb gem but decided to use yours because it seems more complete. I just found one flaw, at least on my opinion.

Calling for ex dexter.posters('en'), the object returned doesnt have poster's tvdb_id. I think would be a good idea return the id so we can keep track easily if we already have saved that image.

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.