eihmels/twitch-helix-streams
最新稳定版本:1.1.0
Composer 安装命令:
composer require eihmels/twitch-helix-streams
包简介
implements the Twitch Api "GET https://api.twitch.tv/helix/streams"
README 文档
README
twitch-helix-streams
implements the Twitch Api "GET https://api.twitch.tv/helix/streams"
you can find a complete Documentation of this Api here
requirements
>= PHP 8.1
Get Started
Composer Require
composer require eihmels/twitch-helix-streams
please take a look into the examples folder. change your credentials and tryit.
you will get a StreamCollection from the GetStreams class, looks like this:
StreamCollection:
Streams[] streams;
Pagination pagination
Streams
a Representation of one single stream with all Information from The Api. looks like this:
Stream:
StreamIdentifier streamIdentifier,
UserIdentifier userIdentifier,
UserLogin userLogin,
UserName userName,
Type type,
Title title,
Tags tags,
ViewerCount viewerCount,
StartedAt startedAt,
Language language,
ThumbnailUrl thumbnailUrl,
TagIdentifiers tagIdentifiers,
IsMature isMature
please take a look in the Twitch Streams Documentation about this.
Client
you have to initialize a client that holds the endpoint and your ClientId and a ClientInterface.
$client = new TwitchHelix('https://api.twitch.tv', '/helix/streams', '<yourClientId>', new Client());
Now you can initialize the Application that returns a list of streams like you see above:
$application->execute( '<yourToken>', new QueryParameterCollection( [ new UserIdentifier('123456') ], new First(2), ) ));
Querys
you can Query the Streams with the Queryparameters in a QueryParameterCollection:
Available QueryParameters:
- Language
- GameIdentifiers
- UserIdentifier
- UserLogin
- Type
统计信息
- 总下载量: 309
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-07