API client for Kitsu.io, with optional Anime collection, and optional Anilist syncing.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

KitsuRequestBuilder.php 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php declare(strict_types=1);
  2. /**
  3. * Hummingbird Anime List Client
  4. *
  5. * An API client for Kitsu and MyAnimeList to manage anime and manga watch lists
  6. *
  7. * PHP version 7
  8. *
  9. * @package HummingbirdAnimeClient
  10. * @author Timothy J. Warren <tim@timshomepage.net>
  11. * @copyright 2015 - 2018 Timothy J. Warren
  12. * @license http://www.opensource.org/licenses/mit-license.html MIT License
  13. * @version 4.0
  14. * @link https://git.timshomepage.net/timw4mail/HummingBirdAnimeClient
  15. */
  16. namespace Aviat\AnimeClient\API\Kitsu;
  17. use Aviat\AnimeClient\API\APIRequestBuilder;
  18. class KitsuRequestBuilder extends APIRequestBuilder {
  19. /**
  20. * The base url for api requests
  21. * @var string $base_url
  22. */
  23. protected $baseUrl = 'https://kitsu.io/api/edge/';
  24. /**
  25. * HTTP headers to send with every request
  26. *
  27. * @var array
  28. */
  29. protected $defaultHeaders = [
  30. 'User-Agent' => "Tim's Anime Client/4.0",
  31. 'Accept' => 'application/vnd.api+json',
  32. 'Content-Type' => 'application/vnd.api+json',
  33. 'CLIENT_ID' => 'dd031b32d2f56c990b1425efe6c42ad847e7fe3ab46bf1299f05ecd856bdb7dd',
  34. 'CLIENT_SECRET' => '54d7307928f63414defd96399fc31ba847961ceaecef3a5fd93144e960c0e151',
  35. ];
  36. }