Package com.gmt2001
Class TwitchAPIv5
java.lang.Object
com.gmt2001.TwitchAPIv5
Deprecated, for removal: This API element is subject to removal in a future version.
Stubs to
Helix
for backwards compatibility- Author:
- gmt2001, illusionaryone
-
Method Summary
Modifier and TypeMethodDescriptionvoid
FixFollowedTable
(String channel, DataStore dataStore, boolean force) Deprecated, for removal: This API element is subject to removal in a future version.Wrapper to perform the followed table updated.boolean
getBotVerified
(String channel) Deprecated, for removal: This API element is subject to removal in a future version.Checks to see if the bot account is verified by Twitch.GetChannel
(String channel) Deprecated, for removal: This API element is subject to removal in a future version.Gets a channel objectGetChannel2
(String channel, String[] updates) Deprecated, for removal: This API element is subject to removal in a future version.getChannelCreatedDate
(String channel) Deprecated, for removal: This API element is subject to removal in a future version.Returns when a Twitch account was created.GetChannelFollows
(String channel, int limit, int offset, boolean ascending) Deprecated, for removal: This API element is subject to removal in a future version.Gets an object listing the users following a channelGetChannelFollows
(String channel, int limit, String from) Deprecated, for removal: This API element is subject to removal in a future version.Gets an object listing the users following a channelint
getChannelId
(String channel) Deprecated, for removal: This API element is subject to removal in a future version.Returns the channel IdGetChannelSubscriptions
(String channel, int limit, int offset, boolean ascending) Deprecated, for removal: This API element is subject to removal in a future version.Gets an object listing the users subscribing to a channelGetChannelSubscriptions
(String channel, int limit, int offset, boolean ascending, String oauth) Deprecated, for removal: This API element is subject to removal in a future version.GetChannelSubscriptions
(String channel, int limit, String from) Deprecated, for removal: This API element is subject to removal in a future version.Gets an object listing the users subscribing to a channelgetChannelTeams
(String channelName) Deprecated, for removal: This API element is subject to removal in a future version.Method that gets the teams that the channel is in.GetChannelVODs
(String channel, String type) Deprecated, for removal: This API element is subject to removal in a future version.Gets the list of VODs from TwitchGetChatUsers
(String channel) Deprecated, for removal: This API element is subject to removal in a future version.Gets a list of users in the channelDeprecated, for removal: This API element is subject to removal in a future version.Gets the list of cheer emotes from TwitchDeprecated, for removal: This API element is subject to removal in a future version.Builds a RegExp String to match cheer emotes from TwitchgetClipsToday
(String channel) Deprecated, for removal: This API element is subject to removal in a future version.Get the clips from today for a channel.GetCommunities
(String channel) Deprecated, for removal: This API element is subject to removal in a future version.Gets the communities object array.GetCommunityID
(String name) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Gets the full list of emotes from TwitchDeprecated, for removal: This API element is subject to removal in a future version.Gets a stream objectGetStreams
(String channels) Deprecated, for removal: This API element is subject to removal in a future version.Gets a streams object array.Deprecated, for removal: This API element is subject to removal in a future version.Method that gets a Twitch team.Deprecated, for removal: This API element is subject to removal in a future version.Gets a user object by user nameGetUserByID
(String userID) Deprecated, for removal: This API element is subject to removal in a future version.Gets a user object by IDGetUserFollowsChannel
(String user, String channel) Deprecated, for removal: This API element is subject to removal in a future version.Checks if a user is following a channelGetUserFromOauth
(String userOauth) Deprecated, for removal: This API element is subject to removal in a future version.Returns a username when given an Oauth.boolean
HasOAuth()
Deprecated, for removal: This API element is subject to removal in a future version.static TwitchAPIv5
instance()
Deprecated, for removal: This API element is subject to removal in a future version.RunCommercial
(String channel, int length) Deprecated, for removal: This API element is subject to removal in a future version.Runs a commercial.SearchGame
(String game) Deprecated, for removal: This API element is subject to removal in a future version.void
SetClientID
(String clientid) Deprecated, for removal: This API element is subject to removal in a future version.void
Deprecated, for removal: This API element is subject to removal in a future version.boolean
TestAPI()
Deprecated, for removal: This API element is subject to removal in a future version.Tests the Twitch API to ensure that authentication is good.UpdateChannel
(String channel, String status, String game) Deprecated, for removal: This API element is subject to removal in a future version.Updates the status and game of a channelUpdateChannel
(String channel, String status, String game, int delay) Deprecated, for removal: This API element is subject to removal in a future version.Updates the status and game of a channelUpdateChannel
(String channel, String oauth, String status, String game) Deprecated, for removal: This API element is subject to removal in a future version.UpdateChannel
(String channel, String oauth, String status, String game, int delay) Deprecated, for removal: This API element is subject to removal in a future version.UpdateCommunities
(String channel, String[] communities) Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Details
-
instance
Deprecated, for removal: This API element is subject to removal in a future version. -
SetClientID
Deprecated, for removal: This API element is subject to removal in a future version. -
SetOAuth
Deprecated, for removal: This API element is subject to removal in a future version. -
HasOAuth
public boolean HasOAuth()Deprecated, for removal: This API element is subject to removal in a future version. -
GetChannel
Deprecated, for removal: This API element is subject to removal in a future version.Gets a channel object- Parameters:
channel
-- Returns:
- Throws:
JSONException
-
GetChannel2
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
JSONException
-
UpdateChannel
Deprecated, for removal: This API element is subject to removal in a future version.Updates the status and game of a channel- Parameters:
channel
-status
-game
-- Returns:
- Throws:
JSONException
-
UpdateChannel
public JSONObject UpdateChannel(String channel, String oauth, String status, String game) throws JSONException Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
JSONException
-
UpdateChannel
public JSONObject UpdateChannel(String channel, String oauth, String status, String game, int delay) throws JSONException Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
JSONException
-
UpdateChannel
public JSONObject UpdateChannel(String channel, String status, String game, int delay) throws JSONException Deprecated, for removal: This API element is subject to removal in a future version.Updates the status and game of a channel- Parameters:
channel
-status
-game
-delay
- -1 to not update- Returns:
- Throws:
JSONException
-
UpdateCommunities
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
JSONException
-
SearchGame
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
JSONException
-
GetCommunityID
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
JSONException
-
GetChannelFollows
public JSONObject GetChannelFollows(String channel, int limit, int offset, boolean ascending) throws JSONException Deprecated, for removal: This API element is subject to removal in a future version.Gets an object listing the users following a channel- Parameters:
channel
-limit
- between 1 and 100offset
-ascending
-- Returns:
- Throws:
JSONException
-
GetChannelFollows
Deprecated, for removal: This API element is subject to removal in a future version.Gets an object listing the users following a channel- Parameters:
channel
-limit
- between 1 and 100from
-- Returns:
- Throws:
JSONException
-
GetChannelSubscriptions
public JSONObject GetChannelSubscriptions(String channel, int limit, int offset, boolean ascending) throws JSONException Deprecated, for removal: This API element is subject to removal in a future version.Gets an object listing the users subscribing to a channel- Parameters:
channel
-limit
- between 1 and 100offset
-ascending
-- Returns:
- Throws:
JSONException
-
GetChannelSubscriptions
public JSONObject GetChannelSubscriptions(String channel, int limit, String from) throws JSONException Deprecated, for removal: This API element is subject to removal in a future version.Gets an object listing the users subscribing to a channel- Parameters:
channel
-limit
- between 1 and 100from
-- Returns:
- Throws:
JSONException
-
GetChannelSubscriptions
public JSONObject GetChannelSubscriptions(String channel, int limit, int offset, boolean ascending, String oauth) throws JSONException Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
JSONException
-
GetStream
Deprecated, for removal: This API element is subject to removal in a future version.Gets a stream object- Parameters:
channel
-- Returns:
- Throws:
JSONException
-
GetStreams
Deprecated, for removal: This API element is subject to removal in a future version.Gets a streams object array. Each channel id should be separated with a comma.- Parameters:
channels
-- Returns:
- Throws:
JSONException
-
GetCommunities
Deprecated, for removal: This API element is subject to removal in a future version.Gets the communities object array.- Parameters:
channel
-- Returns:
- Throws:
JSONException
-
GetUser
Deprecated, for removal: This API element is subject to removal in a future version.Gets a user object by user name- Parameters:
user
-- Returns:
- Throws:
JSONException
-
GetUserByID
Deprecated, for removal: This API element is subject to removal in a future version.Gets a user object by ID- Parameters:
userID
-- Returns:
- Throws:
JSONException
-
RunCommercial
Deprecated, for removal: This API element is subject to removal in a future version.Runs a commercial. Will fail if channel is not partnered, a commercial has been run in the last 8 minutes, or stream is offline- Parameters:
channel
-length
- (30, 60, 90, 120, 150, 180)- Returns:
- jsonObj.optInt("_http") == 422 if length is invalid or the channel is currently ineligible to run a commercial due to restrictions listed in the method description
- Throws:
JSONException
-
GetChatUsers
Deprecated, for removal: This API element is subject to removal in a future version.Gets a list of users in the channel- Parameters:
channel
-- Returns:
-
GetUserFollowsChannel
Deprecated, for removal: This API element is subject to removal in a future version.Checks if a user is following a channel- Parameters:
user
-channel
-- Returns:
- Throws:
JSONException
-
GetEmotes
Deprecated, for removal: This API element is subject to removal in a future version.Gets the full list of emotes from Twitch- Returns:
- Throws:
JSONException
-
GetCheerEmotes
Deprecated, for removal: This API element is subject to removal in a future version.Gets the list of cheer emotes from Twitch- Returns:
- Throws:
JSONException
-
GetCheerEmotesRegex
Deprecated, for removal: This API element is subject to removal in a future version.Builds a RegExp String to match cheer emotes from Twitch- Returns:
- Throws:
JSONException
-
GetChannelVODs
Deprecated, for removal: This API element is subject to removal in a future version.Gets the list of VODs from Twitch- Parameters:
channel
- The channel requesting data fortype
- The type of data: current, highlights, archives- Returns:
- String List of Twitch VOD URLs (as a JSON String) or empty String in failure.
- Throws:
JSONException
-
getChannelCreatedDate
Deprecated, for removal: This API element is subject to removal in a future version.Returns when a Twitch account was created.- Parameters:
channel
-- Returns:
- String date-time representation (2015-05-09T00:08:04Z)
- Throws:
JSONException
-
getChannelTeams
Deprecated, for removal: This API element is subject to removal in a future version.Method that gets the teams that the channel is in.- Parameters:
channelName
-- Returns:
- Throws:
JSONException
-
getTeam
Deprecated, for removal: This API element is subject to removal in a future version.Method that gets a Twitch team.- Parameters:
teamName
-- Returns:
- Throws:
JSONException
-
getBotVerified
Deprecated, for removal: This API element is subject to removal in a future version.Checks to see if the bot account is verified by Twitch.- Parameters:
channel
-- Returns:
- boolean true if verified
- Throws:
JSONException
-
getClipsToday
Deprecated, for removal: This API element is subject to removal in a future version.Get the clips from today for a channel.- Parameters:
channel
-- Returns:
- JSONObject clips object.
- Throws:
JSONException
-
FixFollowedTable
public void FixFollowedTable(String channel, DataStore dataStore, boolean force) throws JSONException Deprecated, for removal: This API element is subject to removal in a future version.Wrapper to perform the followed table updated. In order to ensure that PhantomBot does not get stuck trying to perform this work, a thread is spawned to perform the work.- Parameters:
channel
- Name of the channel to lookup data fordataStore
- Copy of database objectforce
- Force the run even if the number of followers is too high- Throws:
JSONException
-
TestAPI
Deprecated, for removal: This API element is subject to removal in a future version.Tests the Twitch API to ensure that authentication is good.- Returns:
- Throws:
JSONException
-
GetUserFromOauth
Deprecated, for removal: This API element is subject to removal in a future version.Returns a username when given an Oauth.- Parameters:
userOauth
- Oauth to check with.- Returns:
- String The name of the user or null to indicate that there was an error.
- Throws:
JSONException
-
getChannelId
Deprecated, for removal: This API element is subject to removal in a future version.Returns the channel Id- Parameters:
channel
- channel name- Returns:
- int the channel id.
-
Helix
instead. In scripts, use$.helix
instead of$.twitch