helgesverre / laravel-podscan
Laravel 客户端,用于 Podscan.fm API
v1.0.0
2024-03-23 15:36 UTC
Requires
- php: ^8.2
- saloonphp/laravel-plugin: ^v3.5.0
- saloonphp/pagination-plugin: ^2.0
- saloonphp/saloon: ^v3.8.0
- spatie/laravel-data: ^4.3.2
- spatie/laravel-package-tools: ^1.16.4
Requires (Dev)
- larastan/larastan: ^2.0.1
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8
- orchestra/testbench: ^8.8
- pestphp/pest: ^2.20
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
README
Laravel 客户端,用于 Podscan.fm API
此软件包提供了一个简单易用的 API 客户端,用于 Podscan.fm API
安装
您可以通过 composer 安装此包
composer require helgesverre/laravel-podscan
您可以使用以下命令发布配置文件
php artisan vendor:publish --tag="podscan-config"
这是已发布配置文件的内容
return [ 'api_key' => env('PODSCAN_API_KEY'), ];
使用方法
客户端实例化
创建 Podscan 客户端实例以开始与 API 交互。此实例将是您向 Podscan.AI 发送请求的主要接口。
use HelgeSverre\Podscan\Podscan; // Instantiate the client $podscan = new Podscan(apiKey: config('podscan.api_key')); // Or use the Facade (Laravel) Podscan::alerts(); Podscan::category(); Podscan::episodes(); Podscan::podcasts(); Podscan::teams();
资源
警报
Podscan::alerts()->list(); Podscan::alerts()->create(); Podscan::alerts()->get(); Podscan::alerts()->update(); Podscan::alerts()->delete(); Podscan::alerts()->mentions(); Podscan::alerts()->mention();
类别
Podscan::categories()->list();
剧集
Podscan::episodes()->search(); Podscan::episodes()->paginatedSearch(); Podscan::episodes()->recent(); Podscan::episodes()->get();
播客
Podscan::podcasts()->suggest(); Podscan::podcasts()->search(); Podscan::podcasts()->paginatedSearch(); Podscan::podcasts()->get(); Podscan::podcasts()->episodes(); Podscan::podcasts()->paginatedEpisodes();
团队
Podscan::teams()->list();
测试
cp .env.example .env
composer test
composer analyse src
许可证
MIT 许可证(MIT)。有关更多信息,请参阅许可证文件
免责声明
Podscan 和 Podscan 标志是 Arvid Kahl 的商标。本软件包与 Podscan 或 Arvid Kahl 没有任何关联。