Skip to content

Latest commit

 

History

History
153 lines (104 loc) · 3.08 KB

README.md

File metadata and controls

153 lines (104 loc) · 3.08 KB

TVDB API

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

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

Usage

Here are a few basic examples to get you started:

Ensure you have set the following environment variables:

export TVDB_API_KEY=your_api_key
export TVDB_PIN=your_pin
require 'tvdb_api'

api = TVDBApi.new

search

Searches TV Shows, Films, Actors, and People.

response = api.search('The Dark Knight')
# Do something with the response

search_series

response = api.search_series('The Simpsons')
# Do something with the response

search_films

response = api.search_films('Star Wars')
# Do something with the response

search_people

response = api.search_films('Martin Sheen')
# Do something with the response

movie

```ruby
response = api.movie(12879)
# Do something with the response
```

series

```ruby
response = api.series(75299)
# Do something with the response
```

person

```ruby
response = api.person(256583)
# Do something with the response
```

Development

To set up the development environment, follow these steps:

  1. Clone the repository:
git clone https://github.com/your-username/tvdb_api.git
  1. Change into the directory:
cd tvdb_api_wrapper
  1. Install dependencies:
bundle install

Running Tests

To run RSpec tests, execute the following:

rspec

Contributing

Bug reports and pull requests are welcome on GitHub at here.

License

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

MIT License

Copyright (c) 2023 Stephen McCullough

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.