定制 farzai/twitch 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

farzai/twitch

Composer 安装命令:

composer require farzai/twitch

包简介

Laravel Twitch

README 文档

README

Still in development

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status codecov Total Downloads

Description

Laravel Twitch is a package that provides an easy way to interact with the Twitch API using Laravel. It simplifies the process of making requests to the Twitch API and handling the responses. The package includes features such as authentication, making API requests, and handling pagination.

Installation

To install the package, you can use Composer:

composer require farzai/twitch

The package requires PHP 8.1 or higher and the following dependencies:

  • spatie/laravel-package-tools: ^1.14.0
  • illuminate/contracts: ^10.0

Usage

Here are some examples of how to use the package:

Retrieving an Access Token

use Farzai\Twitch\Authorizer;

$accessToken = Authorizer::retrieveAccessToken();

Making API Requests

use Farzai\Twitch\Builder;
use Farzai\Twitch\Models\Game;

$builder = new Builder(Game::class);
$games = $builder->search('Fortnite')->get();

Configuration

To configure the package, you need to set up the necessary credentials in your .env file:

TWITCH_CLIENT_ID=your-client-id
TWITCH_CLIENT_SECRET=your-client-secret

You can also publish the configuration file to customize the package settings:

php artisan vendor:publish --tag=twitch-config

Contributing

If you would like to contribute to the package, please follow these guidelines:

  1. Fork the repository.
  2. Create a new branch for your feature or bugfix.
  3. Write tests for your changes.
  4. Run the tests to ensure they pass.
  5. Submit a pull request with a clear description of your changes.

If you find any issues or have any questions, feel free to open an issue on GitHub.

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-26