🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more
Socket
Book a DemoInstallSign in
Socket

thetvdb_party

Package Overview
Dependencies
Maintainers
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thetvdb_party

bundlerRubygems
Version
0.1.5
Version published
Maintainers
5
Created
Source

TheTvDbParty Gem Version

The thetvdb_party gem accesses the TheTvDB programmers API as it is described on http://thetvdb.com/wiki/index.php/Programmers_API

It uses compression to minimize bandwith when accessing Full Series Records.

Installation

Add this line to your application's Gemfile:

gem 'thetvdb_party'

And then execute:

$ bundle

Or install it yourself as:

$ gem install thetvdb_party

Usage

Creating a TheTvDb API client

To create a new client without an api key:

client = TheTvDbParty::Client.new

Or with an api key:

client = TheTvDbParty::Client.new "<your api key>"

It is recommended to use an .env file or environment variable to store the API key. For example like this:

Contents of .env

TVDB_API_KEY=<YOUR API KEY>

Performing searches

Once you have a client instance, you can perform searches against the TheTvDb API. The following example searches for The Mentalist on TheTvDb.

results = client.search "The Mentalist"

The #search method of the client returns an array containing the search results. Iterate over this array to get the Base Series Record of the search results.

results.each do |search_result_record|
  base_series_record = search_result_record.get_base_series_record
end

Contributing

  • Fork it ( https://github.com/couven92/thetvdb_party/fork )
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create a new Pull Request

FAQs

Package last updated on 11 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts