{"id":25874263,"url":"https://github.com/pioz/tvdb2","last_synced_at":"2025-07-28T12:14:00.700Z","repository":{"id":56304614,"uuid":"99360661","full_name":"pioz/tvdb2","owner":"pioz","description":"Ruby wrapper for TVDB api version 2","archived":false,"fork":false,"pushed_at":"2023-05-22T10:49:00.000Z","size":105,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T06:45:36.710Z","etag":null,"topics":["api","ruby","tv-series","tvdb"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pioz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-04T16:22:27.000Z","updated_at":"2023-05-22T10:49:05.000Z","dependencies_parsed_at":"2022-08-15T16:20:34.340Z","dependency_job_id":null,"html_url":"https://github.com/pioz/tvdb2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pioz%2Ftvdb2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pioz%2Ftvdb2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pioz%2Ftvdb2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pioz%2Ftvdb2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pioz","download_url":"https://codeload.github.com/pioz/tvdb2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241482706,"owners_count":19969963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","ruby","tv-series","tvdb"],"created_at":"2025-03-02T09:19:39.973Z","updated_at":"2025-03-02T09:19:40.480Z","avatar_url":"https://github.com/pioz.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TVDB2 API for Ruby\n\nRuby wrapper for TVDB json api version 2.\n\nThe TVDB api version 2 documentation [can be found here](https://api.thetvdb.com/swagger).\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'tvdb2'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install tvdb2\n\n\n## Usage\n\nFirst of all you need to get your API key:\n\n* Register an account on http://thetvdb.com/?tab=register\n* When you are logged register an api key on http://thetvdb.com/?tab=apiregister\n* View your api keys on http://thetvdb.com/?tab=userinfo\n\n```\nrequire 'tvdb2'\n\n# Create a client object with your api key\nclient = TVDB.new(apikey: 'YOUR_API_KEY', language: 'en')\n\n# Search series by name\nresults = client.search(name: 'Game of Thrones')\nputs results.map(\u0026:name).inspect\n# Get best series result by name\ngot = best_result = client.best_search('Game of Thrones')\nputs got.name\n\n# Get list of actors\nactors = got.actors\nputs actors.first.name\nputs actors.first.role\nputs actors.first.image_url\n\n# Print some info about all episodes\ngot.episodes.each do |episode|\n  puts episode.x\n  puts episode.absoluteNumber\n  puts episode.seasonNumber\n  puts episode.number\n  puts episode.overview\nend\n# Get only episodes from 101 and 200\nepisodes = got.episodes(page: 2)\n# Get all episodes of season 1\nepisodes = got.episodes(airedSeason: 1)\n# Get episode by index\nputs got[3].name\n# Get episode by x syntax (SEASON_NUMBERxEPISODE_NUMBER)\nep = got['3x9']\nputs ep.name\nputs ep.x # print '3x9'\n\n# Get banner\nurl = got.banner_url\n# Get random banner\nurl = got.banner_url(random: true)\n# Get poster\nurl = got.poster_url\n# Get random poster\nurl = got.poster_url(random: true)\n# Get all posters\nposters = got.posters\nputs posters.first.url\n# or\nposters = got.images(keyType: 'poster')\n# Get all season images\nimages = got.season_images\nputs images.first.url\n# Get all season images of season 2\nimages = got.season_images(season: 2)\nputs images.first.url\n\n# Switch language\nep = got['3x9']\nclient.language = 'it'\nputs ep.name           # print episode title in italian\nclient.language = 'en'\nputs ep.name           # print episode title in english\n# or you can swith language only in a block\nclient.with_language(:it) do\n  puts ep.name\nend\n```\n\nThe complete __documentation__ can be found [here](https://pioz.github.io/tvdb2).\n\n\n## Missing REST endpoints\n\nThis wrapper do not coverage all 100% api REST endpoints.\nMissing methods are:\n\n* __Series__\n    * filter: `GET /series/{id}/filter`\n* __Updates__\n    * updadad: `GET /updated/query`\n* __Users__\n    * user: `GET /user`\n    * favorites: `GET /user/favorites`\n    * delete favorites: `DELETE /user/favorites/{id}`\n    * add favorites: `PUT /user/favorites/{id}`\n    * ratings: `GET /user/ratings`\n    * ratings with query: `GET /user/ratings/query`\n    * delete rating: `DELETE /user/ratings/{itemType}/{itemId}`\n    * add rating: `PUT /user/ratings/{itemType}/{itemId}/{itemRating}`\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/pioz/tvdb2.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpioz%2Ftvdb2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpioz%2Ftvdb2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpioz%2Ftvdb2/lists"}