Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Twitch Api Php Laravel Package

nicklaw5/twitch-api-php

PHP client library for the Twitch API. Includes easy methods for Helix and legacy endpoints, OAuth authentication flows, and request helpers to fetch streams, users, channels, videos, clips, and more. Useful for building Twitch integrations in PHP apps.

View on GitHub
Deep Wiki
Context7
v7.2.0

Changes

  • Promoted EventSubApi -> subscribeToChannelShieldMode to version 1
  • Promoted EventSubApi -> subscribeToChannelFollow to version 2
  • Promoted EventSubApi -> subscribeToChannelCharityCampaign to version 1
  • Resolved error in EventSubApi -> drop.entitlement.grant by adding required parameter of is_batching_enabled (@alexschastny)

New Features

  • Added ChatApi -> sendShoutout
  • Added EventSubApi -> subscribeToChannelShoutout
  • Added ChannelsApi -> getFollowedChannels
  • Added ChannelsApi -> getChannelFollowers
  • Added GoalsApi
  • Added GoalsApi -> getGoals (Thanks @radiojoe!)
  • Added fulfillmentStatus parameter to EntitlementsApi -> getDropsEntitlements (Thanks @alexschastny!)
v7.1.0

New Features

  • Added CharityApi
  • Added CharityApi -> getCharityCampaign
  • Added CharityApi -> getCharityCampaignDonations
  • Added ModerationApi -> getShieldModeStatus
  • Added ModerationApi -> updateShieldModeStatus
  • Added ChatApi -> getChatters
  • Added EventSub -> channel.charity_campaign.start
  • Added EventSub -> channel.charity_campaign.progress
  • Added EventSub -> channel.charity_campaign.stop
  • Added EventSub -> channel.charity_campaign.donate
  • Added EventSub -> channel.shield_mode.begin
  • Added EventSub -> channel.shield_mode.end
v7.0.1

Changes

  • updateDropEntitlements now allows you to specify no parameters, in line with the API Docs
  • Added Missing Testing Coverage for many older functions

New Features

  • Added first parameter to getBannedUsers
  • Added first parameter to getModerators
  • Added EventSub -> drop.entitlement.grant

Pull Request

Full Changelog: https://github.com/nicklaw5/twitch-api-php/compare/v7.0.0...v7.0.1

v7.0.0

This update completes a large amount of endpoint coverage including most of the endpoints released in 2022. A number of changes have occurred to functions that were not working and some changes that happened in the Twitch API itself. Please be sure to review the breaking changes and the other release notes below.

Breaking Changes

  • Removed getBannedEvents and getModeratorEvents - Announcement
  • Removed id parameter from getHypeTrainEvents (this function was broken anyways) - Announcement
  • Removed user_id parameter from checkAutoModStatus - Announcement

Changes

  • Promoted EventSub -> extension.bits_transaction.crate to version 1

New Features

  • Added user_id parameter to getEventSubSubscription
  • Added ChatApi -> getChatSettings
  • Added ChatApi -> updateChatSettings
  • Added ChatApi -> sendChatAnnouncement
  • Added ChatApi -> getUserChatColor
  • Added ChatApi -> updateUserChatColor
  • Added EventSub -> user.authorization.grant
  • Added EventSub -> channel.goal.begin
  • Added EventSub -> channel.goal.progress
  • Added EventSub -> channel.goal.end
  • Added ModerationApi -> banUser
  • Added ModerationApi -> unbanUser
  • Added ModerationApi -> getAutoModSettings
  • Added ModerationApi -> updateAutoModSettings
  • Added ModerationApi -> getBlockedTerms
  • Added ModerationApi -> addBlockedTerm
  • Added ModerationApi -> removeBlockedTerm
  • Added ModerationApi -> deleteChatMessages
  • Added ModerationApi -> addChannelModerator
  • Added ModerationApi -> removeChannelModerator
  • Added ModerationApi -> getVips
  • Added ModerationApi -> addChannelVip
  • Added ModerationApi -> removeChannelVip
  • Added RaidsApi
  • Added RaidsApi -> startRaid
  • Added RaidsApi -> cancelRaid
  • Added WhispersApi
  • Added WhispersApi -> sendWhisper

Pull Request

Full Changelog: https://github.com/nicklaw5/twitch-api-php/compare/v6.1.0...v7.0.0

v6.1.0

NEW FEATURES

  • Add Update Drops Entitlements endpoint #138
v6.0.0

KRAKEN SUPPORT HAS BEEN REMOVED FROM THIS LIBRARY AS OF VERSION 6

The V5 API (Kraken) was considered legacy for some time now, and as of July 15, 2021, began a gradual shutdown. If you have not accessed v5 before this date, you can no longer access that API. For those who are continuing to use it until February 2022, you should remain on a lower version of this library, however we would encourage you to upgrade to a compatible endpoint. Read more here.

Helix Namespace and Classes Changed from NewTwitchApi to TwitchApi

We've updated the name of the namespace to be consistent with the language from Twitch, which is Twitch API. We've added some code that will remain in for the current future that allows continued calls to the NewTwitchApi Namespace and Classes. You should begin using the new classes ASAP by updating your code. Any time you have been individually initializing classes instead of using our helper functions you will begin to receive errors until you update your namespace and classes. You can review the Getting Started section of the README for more information.

If you were previously using:

$helixGuzzleClient = new \NewTwitchApi\HelixGuzzleClient($twitch_client_id);
$newTwitchApi = new \NewTwitchApi\NewTwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);

You should change this code to:

$helixGuzzleClient = new \TwitchApi\HelixGuzzleClient($twitch_client_id);
$twitchApi = new \TwitchApi\TwitchApi($helixGuzzleClient, $twitch_client_id, $twitch_client_secret);

Not changing this code will not break your project at this time but in the future, when the legacy classes are removed, your project will begin to throw errors. No timeline has been announced for this yet.

BREAKING CHANGES

  • Drop v5 Support
  • Rename Namespace for Helix from NewTwitchApi to TwitchApi
  • Rename NewTwitchApi Class to TwitchApi
  • Removed createUserFollow and deleteUserFollow from UsersApi (Twitch Announcement)

MAINTENANCE

  • Added NewTwitchApi\NewTwitchApi Class that extends TwitchApi\TwitchApi for backwards compatibility
  • Added NewTwitchApi\HelixGuzzleClient Class that extends TwitchApi\HelixGuzzleClient for backwards compatibility
v5.0.5

NEW FEATURES

  • Added ScheduleApi
  • Added ScheduleApi -> getChannelStreamSchedule
  • Added ScheduleApi -> getChanneliCalendar (optional auth)
  • Added ScheduleApi -> updateChannelStreamSchedule
  • Added ScheduleApi -> createChannelStreamScheduleSegment
  • Added ScheduleApi -> updateChannelStreamScheduleSegment
  • Added ScheduleApi -> deleteChannelStreamScheduleSegment
  • Added EventSub->subscribeToChannelSubscriptionMessage

CORE

  • Allow Optional Auth in Request Generator
  • Cleanup Headers in Request Generator
  • Added getApiWithOptionalAuth for explicit calls with optional authentication (since all endpoints but 1 require auth at this time)
v5.0.3

NEW FEATURES

  • Added ChatApi->GetChannelEmotes
  • Added ChatApi->GetGlobalEmotes
  • Added ChatApi->GetEmotesSet
v5.0.2

This release fixes some issues we introduced in v5.0 when we stopped extending the Guzzle Client.

BREAKING

  • Stop testing Webhook Subscriptions API (it is broken in the library, use EventSub instead per Twitch's recommendation)

CORE

  • Convert HelixGuzzleClient to be a Guzzle Middleware
  • Adjusted all calls for Guzzle\Client to HelixGuzzleClient
v5.0.1

BREAKING

  • Promote ChannelSubscriptionEnd from beta to v1 (renamed from ChannelUnsubscribe)

NEW FEATURES

  • Add channel.subscription.gift to EventSub (beta)
  • Add ChatApi
  • Add ChatApi->getChannelChatBadges
  • Add ChatApi->getGlobalChatBadges
v5.0.0

We've prepared a major release which contains breaking changes and (basically) complete endpoint coverage. This also includes our introduction in support for the Event Sub API.

BREAKING CHANGES

  • Remove SubscriptionsApi->getSubscriptionEvents #107 (pulled by Twitch)
  • Remove StreamsApi->getChannelInfo #105 (duplicate, moved to ChannelsApi)
  • Remove StreamsApi->getStreamTags #104 (duplicate, moved to TagsApi)
  • Remove StreamsApi->getStreamsMetadata #103 (pulled by Twitch)

NEW FUNCTIONS

  • Add AdsApi
  • Add AdsApi->startCommercial
  • Add ChannelsApi->modifyChannelInfo
  • Add ChannelPointsApi->createCustomReward
  • Add ChannelPointsApi->updateCustomReward
  • Add ChannelPointsApi->updateRedemptionStatus
  • Add ModerationApi->checkAutoModStatus
  • Add ModerationApi->manageHeldAutoModMessage
  • Add PollsApi->createPoll
  • Add PollsApi->endPoll
  • Add PredictionsApi->createPrediction
  • Add PredictionsApi->endPrediction
  • Add StreamsApi->createStreamMarker
  • Add TagsApi->replaceStreamTags
  • Add EventSubApi

CORE

  • Stopped extending Guzzle Client #121
  • Added Request Generator class to tidy up code and resolve testing errors #117
v4.2.2

NEW FEATURES

  • Add PollsApi
  • Add PollsApi -> getPolls
  • Add PredictionsApi
  • Add PredictionsApi -> getPredictions
v4.2.1

NEW FUNCTIONS

  • Added StreamsApi->getFollowedStreams
v4.2.0

NEW FUNCTIONS

  • Added ChannelsApi
  • Added ChannelsApi->getChannelInfo
  • Added ChannelsApi->getChannelEditors
  • Added UsersApi->getUserBlockList
  • Added UsersApi->blockUser
  • Added UsersApi->unblockUser
  • Added VideosApi->deleteVideos
v4.1.0

NEW FUNCTIONS

  • Added TeamsApi
  • Added TeamsApi->getChannelTeams
  • Added TeamsApi->getTeams
  • Added SubscriptionsApi->checkUserSubscription

Thank you @ThibaultVlacich! 👍

v4.0.0

BREAKING CHANGES

  • Removed communityIds parameter in getStreams #89
  • Renamed getEntitlmentGrantsUploadURL to createEntitlmentGrantsUploadURL #93

NEW FUNCTIONS

  • Added ChannelPointsApi->deleteCustomReward
  • Added UsersApi->updateUser
  • Added EntitlementsApi->getDropsEntitlements

MAINTENANCE

  • Removed duplicate functions in ChannelPointsApi
  • Renamed callApi to getApi #92
  • Added patchApi ability in library
  • Added postApi ability in library
  • Added putApi ability in library
  • Added deleteApi ability in library

VERSION NOTE Support for PHP 7.2 and 7.3 are no longer maintained and are not tested in our workflows. While there are no known issues at this time, we cannot guarantee this library will work on a version less than PHP 7.4 at the time of writing.

v3.3.0

Thanks again to @brandinarsenault for his work!

v3.2.0

Thanks, as always, to @brandinarsenault for his efforts!

This release includes:

v3.1.1
  • Allow support for Guzzle 7.x to assist with other dependencies (eg. Laravel v8) (#84)
v3.1.0
  • Added bearer token support for unsubscribe methods (#80)
v3.0.5

New APIs:

  • NewTwitchApi->getAnalyticsApi
  • NewTwitchApi->getTagsApi

New endpoints

  • BitsApi->getExtensionTransactions
  • AnalyticsApi->getExtensionAnalytics
  • AnalyticsApi->getGameAnalytics
  • EntitlementsApi->getStatusCode
  • EntitlementsApi->redeemCode
  • TagsApi->getAllStreamTags
  • TagsApi->getStreamTags
  • UsersApi->createUserFollow

A big thanks to @brandinarsenault for all his work!

v3.0.4
  • Add Get Stream Tags endpoint support (#72 - @oldskool )
v3.0.3
  • Fix issue with searching categories (#71 - @thecodeassassin)
  • Added support for entitlements/upload (#70 - @MaxHayman)
  • Switched to GitHub Actions for running tests (#69 - @oldskool)
v3.0.2

This release includes a fix for the VideosApi submitted by @oldskool. #68

v3.0.1

This version adds two new features:

  • Ability to start commercials
  • Ability to create clips

Thanks to @brandinarsenault for adding these features!

v3.0.0

This is the first release of major version 3 of the PHP Twitch API library! This release is not backwards compatible with previous versions. Please read the changelog for information.

  • Breaking Change All endpoints have been updated to require a bearer token, as Twitch has made this a requirement for the API. Endpoint methods now require the bearer token as the first argument.
  • Possible Breaking Change The composer dependencies have been updated to for PHP 7.4, including updated testing libraries.
  • Many new endpoints have been added for bits, clips, hype trains, search, and streams.
  • Travis CI updated to run php-cs-fixer to along with phpunit and phpspec.

HUGE thanks to @brandinarsenault for all the work he put in to add new endpoints! A list of endpoints that still need to be added can be found here: https://github.com/nicklaw5/twitch-api-php/issues/24#issuecomment-641606606

If you require any of these of endpoints, please add them to the library and submit a PR!

v2.1.3

This release includes @brandinarsenault's fix for authenticated calls to a couple of endpoints.

v2.1.2

This release includes a number of new New Twitch API endpoints as well as other improvements and fixes.

Thanks to the following folks for helping create this version and improved this project for us all!

v2.1.1

Add two missing webhook endpoints: "User Changed" and "User Follows" https://github.com/nicklaw5/twitch-api-php/pull/39

v2.1.0

Version 2.1.0 changes:

Breaking Changes

  • IDs are handled as integers instead of strings.

Other Changes

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky