slownls/twitch_api

PHP Twitch API 库

1.0.0 2020-03-18 17:20 UTC

This package is auto-updated.

Last update: 2024-09-19 04:02:57 UTC


README

一个简单的PHP Twitch API库。

安装

要安装此库,请使用composer

composer require "slownls/twitch_api"

用户函数

User::IsLogged() // Whether the user is logged in.

User::Logout() // Used to log the user out.

User::Login() // Used to redirect the user to the twitch login page.

User::Connect(string $code) // Used to connect the user with the twitch token.

User::GetLocalInfo(string $key) // Used to retrieve user's information

User::GetByName(string $userName) // Used to retrieve a user's information with their name.

User::SetChannel(\SlownLS\Twitch\Channel $channel) // Used to set the reference channel

User::HasChannel() // Whether the reference channel is defined

User::IsFollower() // Whether the user is the reference channel.

User::IsSubscriber() // Whether the user subscribes to the reference channel.

User::IsModerator() // Whether the user is the moderator of the reference channel.

User::FollowChannel() // Use to follow the reference channel

User::UnFollowChannel() // Use to no longer follow the reference channel

频道函数

Channel::SetChannel(string $channelName) // Used to set the reference channel

Channel::HasChannel() // Whether the reference channel is defined

Channel::GetInfos() // Used to retrieve the channel information.

Channel::GetStream() // Used to retrieve the stream of the channel

Channel::GetName() // Used to retrieve the name of the channel

Channel::GetDisplayName() // Used to get the channel's poster name.