Project

tvdb_api

0.0
No release in over a year
Provides a convenient way to interact with the TVDB API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 3.0
~> 3.19

Runtime

~> 1.0
~> 2.0
 Project Readme

tvdb_api

Gem Version CI Status License: MIT


A simple Ruby gem to interface with the TVDB.org API, making it easy to search and fetch information about TV series, films, and people.

Installation

Add this line to your application's Gemfile:

gem 'tvdb_api'

And then execute:

bundle install

Or install it yourself as:

gem install tvdb_api

Configuration

Set the following environment variables:

export TVDB_API_TOKEN=your_api_key
export TVDB_PIN=your_pin

Usage

require 'tvdb_api'

api = TVDBApi.new

Search

Search across TV shows, films, and people:

response = api.search('The Dark Knight')

Search by Type

Filter search results by type:

# Search for series only
response = api.search_by_type('The Simpsons', 'series')

# Search for movies only
response = api.search_by_type('Star Wars', 'movie')

Get Movie Details

response = api.movie(12879)

Get Series Details

response = api.series(75299)

Get Person Details

response = api.person(256583)

Development

Prerequisites

  • Ruby >= 3.2
  • Bundler

Setup

git clone https://github.com/swmcc/tvdb_api.git
cd tvdb_api
make install

Make Targets

Target Description
make install Install dependencies
make console Start interactive Ruby console with gem loaded
make test Run all tests
make test.focus Run tests with focus tag
make lint Run RuboCop linter
make lint.fix Auto-fix RuboCop offenses
make check Run all checks (lint + test)
make build Build the gem
make clean Remove built gems
make help Show all available targets

Running Tests

make test

# or run a specific test file
bundle exec rspec spec/tvdb_api_spec.rb

# or run a specific test by line number
bundle exec rspec spec/tvdb_api_spec.rb:27

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/swmcc/tvdb_api.

License

The gem is available as open-source under the terms of the MIT License.