PHP code example of rewrewby / thetvdb2

1. Go to this page and download the library: Download rewrewby/thetvdb2 library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rewrewby / thetvdb2 example snippets

`
$client = new \Adrenth\Thetvdb\Client();
$client->setLanguage('nl');

// Obtain a token
$token = $client->authentication()->login($apiKey, $username, $userKey);
$client->setToken($token);

// Or refresh token
$client->refreshToken();
`
// Get all available languages
$languageData = $client->languages()->all(); // Returns a LanguageData instance
$languages = $languageData->getData()->all();

array:23 [▼
  0 => Language {#26 ▼
    -values: array:4 [▼
      "id" => 27
      "abbreviation" => "zh"
      "name" => "中文"
      "englishName" => "Chinese"
    ]
  }
  1 => Language {#19 ▶}
  2 => Language {#30 ▶}
  3 => Language {#21 ▶}
  // ..
];