jonlaliberte / overseerr-api-php
此包的最新版本(v1.0.1)没有可用的许可证信息。
由 Swagger 生成的 Overseerr API 的 PHP 客户端
v1.0.1
2022-10-10 20:27 UTC
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^6.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ~1.12
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ~2.6
This package is not auto-updated.
Last update: 2024-09-25 03:57:58 UTC
README
这是 Overseerr API 后端的文档。支持两种主要的身份验证方法:- Cookie 身份验证:有效的 /auth/plex
或 /auth/local
登录将生成有效的身份验证cookie。- API 密钥身份验证:也可以通过传递由 Overseerr 生成的有效 API 密钥和 X-Api-Key
头来登录。
此 PHP 包由 Swagger Codegen 项目自动生成
- API 版本:1.0.0
- 构建包:io.swagger.codegen.v3.generators.php.PhpClientCodegen
要求
PHP 5.5 及以上版本
安装 & 使用
Composer
要使用 Composer 安装绑定,请将以下内容添加到 composer.json
{
"repositories": [
{
"type": "git",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
然后运行 composer install
手动安装
下载文件并包含 autoload.php
require_once('/path/to/SwaggerClient-php/vendor/autoload.php');
测试
要运行单元测试
composer install
./vendor/bin/phpunit
入门指南
请按照 安装过程 进行操作,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); $apiInstance = new Swagger\Client\Api\AuthApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); $body = new \Swagger\Client\Model\AuthLocalBody(); // \Swagger\Client\Model\AuthLocalBody | try { $result = $apiInstance->authLocalPost($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AuthApi->authLocalPost: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Api-Key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Api-Key', 'Bearer'); // Configure API key authorization: cookieAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('connect.sid', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('connect.sid', 'Bearer'); $apiInstance = new Swagger\Client\Api\AuthApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); try { $result = $apiInstance->authLogoutPost(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AuthApi->authLogoutPost: ', $e->getMessage(), PHP_EOL; } // Configure API key authorization: apiKey $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-Api-Key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-Api-Key', 'Bearer'); // Configure API key authorization: cookieAuth $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('connect.sid', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('connect.sid', 'Bearer'); $apiInstance = new Swagger\Client\Api\AuthApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); try { $result = $apiInstance->authMeGet(); print_r($result); } catch (Exception $e) { echo 'Exception when calling AuthApi->authMeGet: ', $e->getMessage(), PHP_EOL; } $apiInstance = new Swagger\Client\Api\AuthApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client() ); $body = new \Swagger\Client\Model\AuthPlexBody(); // \Swagger\Client\Model\AuthPlexBody | try { $result = $apiInstance->authPlexPost($body); print_r($result); } catch (Exception $e) { echo 'Exception when calling AuthApi->authPlexPost: ', $e->getMessage(), PHP_EOL; } ?>
API 端点文档
所有 URI 都相对于 {server}/api/v1
模型文档
- AnyOfMediaRequestModifiedBy
- AnyOfinlineResponse20014ResultsItems
- AuthLocalBody
- AuthPlexBody
- AuthResetpasswordBody
- Cast
- Collection
- CreditCast
- CreditCrew
- Crew
- DiscordSettings
- DiscordSettingsOptions
- Episode
- ExternalIds
- Genre
- InlineResponse200
- InlineResponse2001
- InlineResponse20010
- InlineResponse20010Movie
- InlineResponse20011
- InlineResponse20012
- InlineResponse20013
- InlineResponse20014
- InlineResponse20015
- InlineResponse20016
- InlineResponse20017
- InlineResponse20018
- InlineResponse20019
- InlineResponse2002
- InlineResponse20020
- InlineResponse20021
- InlineResponse20022
- InlineResponse20023
- InlineResponse20024
- InlineResponse20025
- InlineResponse20026
- InlineResponse20027
- InlineResponse20028
- InlineResponse20029
- InlineResponse2003
- InlineResponse20030
- InlineResponse20031
- InlineResponse20032
- InlineResponse20033
- InlineResponse20034
- InlineResponse20035
- InlineResponse2004
- InlineResponse2005
- InlineResponse2006
- InlineResponse2007
- InlineResponse2008
- InlineResponse2009
- Issue
- IssueBody
- IssueComment
- IssueCommentCommentIdBody
- IssueIdCommentBody
- Job
- JobIdScheduleBody
- Keyword
- LunaSeaSettings
- LunaSeaSettingsOptions
- MainSettings
- MediaIdStatusBody
- MediaInfo
- MediaRequest
- MovieDetails
- MovieDetailsCollection
- MovieDetailsCredits
- MovieDetailsProductionCountries
- MovieDetailsReleases
- MovieDetailsReleasesReleaseDates
- MovieDetailsReleasesResults
- MovieResult
- Network
- NotificationAgentTypes
- NotificationEmailSettings
- NotificationEmailSettingsOptions
- OneOfPersonResultKnownForItems
- PageInfo
- PersonDetail
- PersonResult
- PlexConnection
- PlexDevice
- PlexLibrary
- PlexSettings
- PlexSyncBody
- ProductionCompany
- PublicSettings
- PushbulletSettings
- PushbulletSettingsOptions
- PushoverSettings
- PushoverSettingsOptions
- RadarrSettings
- RadarrTestBody
- RelatedVideo
- RequestBody
- 重置密码向导正文
- 季节
- 服务arr标签
- 服务配置文件
- 设置主体
- 设置密码主体
- 设置权限主体
- 设置缓存统计信息
- Slack设置
- Slack设置选项
- Sonarr剧集
- Sonarr剧集添加选项
- Sonarr剧集图片
- Sonarr剧集评分
- Sonarr剧集季节
- Sonarr设置
- Sonarr测试主体
- 口语语言
- Telegram设置
- Telegram设置选项
- 电视详情
- 电视详情内容评级
- 电视详情内容评级结果
- 电视详情创建者
- 电视结果
- 用户
- 用户主体
- 用户主体1
- 用户注册推送订阅主体
- 用户设置
- 用户设置通知
- 观看提供商详情
- 观看提供商
- 观看提供商内部
- Web推送设置
- Webhook设置
- Webhook设置选项
授权文档
apiKey
- 类型: API密钥
- API密钥参数名: X-Api-Key
- 位置: HTTP头部
cookieAuth
- 类型: API密钥
- API密钥参数名: connect.sid
- 位置: URL查询字符串