digitalhigh / radarr
PHP Radarr API 封装器
dev-master
2018-05-16 20:12 UTC
Requires
- guzzlehttp/guzzle: ^6.1
This package is not auto-updated.
Last update: 2024-09-29 03:10:14 UTC
README
PHP Radarr 封装器 https://radarr.video/
以下是本包实现的 Radarr API 文档:https://github.com/Radarr/Radarr/wiki/API
安装
composer require digitalhigh/radarr
示例用法
use digitalhigh\Radarr\Radarr;
public function addMovie() { $radarr = new Radarr('http://127.0.0.1:8989', 'cf7544f71b6c4efcbb84b49011fc965c'); // URL and API Key return $radarr->postMovie([ 'tmdbId' => 121856, 'title' => 'Assassin's Creed', 'qualityProfileId' => 3, // HD-720p 'rootFolderPath' => '/volume1/Plex/Movies' ]); }
HTTP 认证
如果您的网站需要 HTTP 认证用户名和密码,您可以这样提供。请注意,如果您在不使用 SSL 的情况下使用 HTTP 认证,您将无保护地在互联网上发送您的用户名和密码。
$radarr = new Radarr('http://127.0.0.1:8989', 'cf7544f71b6c4efcbb84b49011fc965c', 'my-username', 'my-password');
输出
{ "title": "Assassin's Creed", "sortTitle": "assassins creed", "sizeOnDisk": 0, "status": "released", "overview": "Lynch discovers he is a descendant of the secret Assassins society through unlocked genetic memories that allow him to relive the adventures of his ancestor, Aguilar, in 15th Century Spain. After gaining incredible knowledge and skills he’s poised to take on the oppressive Knights Templar in the present day.", "inCinemas": "2016-12-21T00:00:00Z", "images": [ { "coverType": "poster", "url": "/radarr/MediaCover/1/poster.jpg?lastWrite=636200219330000000" }, { "coverType": "banner", "url": "/radarr/MediaCover/1/banner.jpg?lastWrite=636200219340000000" } ], "website": "https://www.ubisoft.com/en-US/", "downloaded": false, "year": 2016, "hasFile": false, "youTubeTrailerId": "pgALJgMjXN4", "studio": "20th Century Fox", "path": "/path/to/Assassin's Creed (2016)", "profileId": 6, "monitored": true, "minimumAvailability": "preDb", "runtime": 115, "lastInfoSync": "2017-01-23T22:05:32.365337Z", "cleanTitle": "assassinscreed", "imdbId": "tt2094766", "tmdbId": 121856, "titleSlug": "assassins-creed-121856", "genres": [ "Action", "Adventure", "Fantasy", "Science Fiction" ], "tags": [], "added": "2017-01-14T20:18:52.938244Z", "ratings": { "votes": 711, "value": 5.2 }, "alternativeTitles": [ "Assassin's Creed: The IMAX Experience" ], "qualityProfileId": 6, "id": 1 }
有关可用方法的参考,请参阅包含的 Radarr::class
注意:当使用键 => 值对发送数据时,键是区分大小写的。