定制 laahudra/twitch-api-php 二次开发

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

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

laahudra/twitch-api-php

Composer 安装命令:

composer require laahudra/twitch-api-php

包简介

A Twitch API client for PHP.

README 文档

README

A Twitch API client for PHP.

Build Status

Supported APIs

This library aims to support v3, v4 and v5 of the Twitch API until each one becomes deprecated. If an API version is not specified, v5 will be used as the default.

Features Completed

Main API Endpoints:

  • Authentication
  • Bits
  • Channel Feed
  • Channels
  • Chat
  • Clips
  • Collections
  • Communities
  • Games
  • Ingests
  • Search
  • Streams
  • Teams
  • Users
  • Videos

Any endpoints missing? Open an issue here.

Other Features:

  • IRC Client
  • Pub/Sub (ie. Bits & Whispers)
  • Video Upload

Additional Integrations:

Basic Example

$options = [
    'client_id' => 'YOUR-CLIENT-ID',
];

$twitchApi = new \TwitchApi\TwitchApi($options);
$user = $twitchApi->getUser(26490481);

// By default API responses are returned as an array, but if you want the raw JSON instead:
$twitchApi->setReturnJson(true);
$user = $twitchApi->getUser(26490481);

// If you want to switch between API versions on the fly:
$twitchApi->setApiVersion(3);
$user = $twitchApi->getUser('summit1g');

See the examples directory for more common use cases.

Requirements

PHP 5.6 or higher is required.

Installation

Either pull in the library via composer:

$ composer require nicklaw5/twitch-api-php

or add the following dependency to your composer.json file and run composer install:

"nicklaw5/twitch-api-php": "0.1.*"

Tests

All unit tests can be run with the following command:

$ vendor/bin/phpunit # or simply "phpunit" if you have it installed globally

Documentation

The Twitch API docs can be found here.

As for the documentation of this library, that is still on the to-do list. In the meantime, most modern IDEs by default, or through the use of plugins, will provide class property and method auto-completion. Or you can simple look through the source code.

License

Distributed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-08-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固