{"id":20411986,"url":"https://github.com/adrenth/thetvdb2","last_synced_at":"2025-10-05T23:30:54.664Z","repository":{"id":4257267,"uuid":"52524031","full_name":"adrenth/thetvdb2","owner":"adrenth","description":"Thetvdb.com API v2 Client","archived":false,"fork":false,"pushed_at":"2024-06-10T10:48:38.000Z","size":174,"stargazers_count":35,"open_issues_count":2,"forks_count":20,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-01-17T06:06:21.844Z","etag":null,"topics":["api","api-client","thetvdb"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/adrenth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-25T12:50:58.000Z","updated_at":"2024-11-18T21:53:59.000Z","dependencies_parsed_at":"2024-06-10T12:20:25.534Z","dependency_job_id":"d97edab1-9e43-4936-ac1d-5d8d95f9818c","html_url":"https://github.com/adrenth/thetvdb2","commit_stats":{"total_commits":74,"total_committers":8,"mean_commits":9.25,"dds":0.6891891891891893,"last_synced_commit":"2aa172d1a379bfef2de372830723b0c1ef0243c2"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrenth%2Fthetvdb2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrenth%2Fthetvdb2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrenth%2Fthetvdb2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrenth%2Fthetvdb2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrenth","download_url":"https://codeload.github.com/adrenth/thetvdb2/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235456661,"owners_count":18993201,"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","api-client","thetvdb"],"created_at":"2024-11-15T05:55:55.804Z","updated_at":"2025-10-05T23:30:49.314Z","avatar_url":"https://github.com/adrenth.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# adrenth/thetvdb2\n\nThis is an API client for the thetvdb.com website. It's using the RESTful API which you'll need to register for to use this package.\n\n## API Key Registration\n\nTo use this PHP package, you need to request an API Key from the thetvdb.com website: [http://thetvdb.com/?tab=apiregister](http://thetvdb.com/?tab=apiregister).\n\nPlease follow these guidelines:\n\n* If you will be using the API information in a commercial product or website, you must email [scott@thetvdb.com](mailto:scott@thetvdb.com) and wait for authorization before using the API. However, you MAY use the API for development and testing before a public release.\n* If you have a publicly available program, you MUST inform your users of this website and request that they help contribute information and artwork if possible.\n* You MUST familiarize yourself with our data structure, which is detailed in the wiki documentation.\n* You MUST NOT perform more requests than are necessary for each user. This means no downloading all of our content (we'll provide the database if you need it). Play nice with our server.\n* You MUST NOT directly access our data without using the documented API methods.\n* You MUST keep the email address in your account information current and accurate in case we need to contact you regarding your key (we hate spam as much as anyone, so we'll never release your email address to anyone else).\n* Please feel free to contact us and request changes to our site and/or API. We'll happily consider all reasonable suggestions.\n\n*Source: thetvdb.com*\n\n## Installation\n\nInstall this package using composer:\n\n```\n$ composer require adrenth/thetvdb2\n```\n\n## Requirements\n\nAt least PHP 7.4\n\n## Documentation\n\nThe official API documentation can be found here: [https://api.thetvdb.com/swagger]().\n\n### Authentication\n\n```php\n$client = new \\Adrenth\\Thetvdb\\Client();\n$client-\u003esetLanguage('nl');\n\n// Obtain a token\n$token = $client-\u003eauthentication()-\u003elogin($apiKey, $username, $userKey);\n$client-\u003esetToken($token);\n\n// Or refresh the token\n$client-\u003erefreshToken();\n```\n\n### Extensions\n\nThe `Client` has a few extensions. A few usage examples are listed below:\n\n#### Authentication\n```php\n$client-\u003eauthentication()-\u003elogin($apiKey, $username, $userKey);\n$client-\u003eauthentication()-\u003erefreshToken();\n```\n\n#### Languages\n```php\n$client-\u003elanguages()-\u003eall();\n$client-\u003elanguages()-\u003eget($languageId);\n```\n\n#### Episodes\n```php\n$client-\u003eepisodes()-\u003eget($episodeId);\n```\n\n#### Series\n```php\n$client-\u003eseries()-\u003eget($seriesId);\n$client-\u003eseries()-\u003egetActors($seriesId);\n$client-\u003eseries()-\u003egetEpisodes($seriesId);\n$client-\u003eseries()-\u003egetImages($seriesId);\n$client-\u003eseries()-\u003egetLastModified($seriesId);\n```\n\n#### Search\n```php\n$client-\u003esearch()-\u003eseriesByName('lost');\n$client-\u003esearch()-\u003eseriesByImdbId('tt2243973');\n$client-\u003esearch()-\u003eseriesByZap2itId('EP015679352');\n```\n\n#### Updates\n\nFetch a list of Series that have been recently updated:\n\n```php\n$client-\u003eupdates()-\u003equery($fromTime, $toTime);\n```\n\n#### Users\n\n```php\n$client-\u003eusers()-\u003eget();\n$client-\u003eusers()-\u003egetFavorites();\n$client-\u003eusers()-\u003eaddFavorite($identifier);\n$client-\u003eusers()-\u003eremoveFavorite($identifier);\n$client-\u003eusers()-\u003egetRatings();\n$client-\u003eusers()-\u003eaddRating($type, $itemId, $rating);\n$client-\u003eusers()-\u003eupdateRating($type, $itemId, $rating);\n$client-\u003eusers()-\u003eremoveRating($type, $itemId);\n```\n\n#### Movies\n\n```php\n$client-\u003emovies()-\u003eget(78398);\n$client-\u003emovies()-\u003egetUpdates();\n```\n\n### Response data\n\nEvery response object has a `getData()` method which may contain a collection of objects.\n\nFor example:\n\n```php\n// Get all available languages\n$languageData = $client-\u003elanguages()-\u003eall(); // Returns a LanguageData instance\n$languages = $languageData-\u003egetData()-\u003eall();\n\narray:23 [▼\n  0 =\u003e Language {#26 ▼\n    -values: array:4 [▼\n      \"id\" =\u003e 27\n      \"abbreviation\" =\u003e \"zh\"\n      \"name\" =\u003e \"中文\"\n      \"englishName\" =\u003e \"Chinese\"\n    ]\n  }\n  1 =\u003e Language {#19 ▶}\n  2 =\u003e Language {#30 ▶}\n  3 =\u003e Language {#21 ▶}\n  // ..\n];\n```\n\n## Contributing\n\nFeel free to join us and create a stable version which is compatible with the brand new TheTVDB.com RESTful API.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrenth%2Fthetvdb2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrenth%2Fthetvdb2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrenth%2Fthetvdb2/lists"}