caliban

package module
v0.0.0-...-b5e7e24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 17 Imported by: 0

README

caliban

===

Twitch API client Go library.

This is a WIP, finished endpoints/features will be documented as development progresses.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnaOpts *analyticsOpts
View Source
var BitsOpts *bitsOptions
View Source
var ChanPointsOpts *chanPointsOpts
View Source
var ChansOpts *channelsOpts
View Source
var ChrtyOpts *charityOpts
View Source
var ChtOpts *chatOpts
View Source
var ClpsOpts *clipsOpts
View Source
var EntOpts *entitlementsOpts
View Source
var EventSubOpts *eventSubOpts
View Source
var ExtOpts *extensionOpts
View Source
var GamesOpt *gamesOptions
View Source
var HypeTrnOpts *hypeTrnOpts
View Source
var ModOpts *moderationOpts
View Source
var MusicOpts *musicOpts
View Source
var PollOpts *pollsOptions
View Source
var PredOpts *predictionsOptions
View Source
var SchdOpts *scheduleOpts
View Source
var SrchOpts *searchOptions
View Source
var StrmOpts *streamsOpts
View Source
var SubsOpts *subsOpts
View Source
var TagsOpts *tagsOpts
View Source
var TeamsOpts *teamsOpts
View Source
var UsrOpts *usersOpts
View Source
var VidOpts *videosOpts

Functions

This section is empty.

Types

type Session

type Session struct {
	AuthConfig oauth2.Config
	AuthTime   time.Time
	AuthToken  oauth2.Token

	Tag string
	// contains filtered or unexported fields
}

Session

func NewSession

func NewSession(ctx context.Context, clientId, label string) (*Session, error)

NewSession

func (*Session) AddBlockedTerm

func (S *Session) AddBlockedTerm(bcastId, modId, text string) *helixResp

AddBlockedTerm

func (*Session) AddChannelModerator

func (S *Session) AddChannelModerator(bcastId, userId string) *helixResp

AddChannelModerator

func (*Session) AddChannelVIP

func (S *Session) AddChannelVIP(bcastId, userId string) *helixResp

AddChannelVIP

func (*Session) BanUser

func (S *Session) BanUser(bcastId, modId string, opts ...moderationOpt) *helixResp

BanUser

func (*Session) BlockUser

func (S *Session) BlockUser(targetUserId string, opts ...usersOpt) *helixResp

BlockUser

func (*Session) CancelRaid

func (S *Session) CancelRaid(bcastId string) *helixResp

CancelRaid

func (*Session) CheckAutoModStatus

func (S *Session) CheckAutoModStatus(bcastId string, opts ...moderationOpt) *helixResp

CheckAutoModStatus

func (*Session) CheckUserSubscription

func (S *Session) CheckUserSubscription(bcastId, userId string) *helixResp

CheckUserSubscription

func (*Session) CreateChannelStreamScheduleSegment

func (S *Session) CreateChannelStreamScheduleSegment(bcastId string, opts ...scheduleOpt) *helixResp

CreateChannelStreamScheduleSegment

func (*Session) CreateClip

func (S *Session) CreateClip(bcastId string, hasDelay bool) *helixResp

func (*Session) CreateCustomRewards

func (S *Session) CreateCustomRewards(bcastId string, opts ...chanPointsOpt) *helixResp

CreateCustomRewards

func (*Session) CreateEventSubSubscription

func (S *Session) CreateEventSubSubscription(opts ...eventSubOpt) *helixResp

CreateEventSubSubscription

func (*Session) CreateExtensionSecret

func (S *Session) CreateExtensionSecret(extId string, delay int) *helixResp

CreateExtensionSecret

func (*Session) CreatePoll

func (S *Session) CreatePoll(bcastId string, opts ...pollsOption) *helixResp

CreatePoll

func (*Session) CreatePrediction

func (S *Session) CreatePrediction(bcastId string, opts ...predictionsOption) *helixResp

CreatePrediction

func (*Session) CreateStreamMarker

func (S *Session) CreateStreamMarker(userId, desc string) *helixResp

CreateStreamMarker

func (*Session) DeleteChannelStreamScheduleSegment

func (S *Session) DeleteChannelStreamScheduleSegment(bcastId, segId string) *helixResp

DeleteChannelStreamScheduleSegment

func (*Session) DeleteChatMessages

func (S *Session) DeleteChatMessages(bcastId, modId, messId string) *helixResp

DeleteChatMessages

func (*Session) DeleteCustomReward

func (S *Session) DeleteCustomReward(bCastId, id string) *helixResp

DeleteCustomReward

func (*Session) DeleteEventSubSubscription

func (S *Session) DeleteEventSubSubscription(id string) *helixResp

DeleteEventSubSubscription

func (*Session) DeleteVideos

func (S *Session) DeleteVideos(opts ...videosOpt) *helixResp

DeleteVideos

func (*Session) Do

func (S *Session) Do(method string, url string, body io.Reader) *helixResp

Do forms a request from the provided inputs, adds any needed Headers, then calls the client's Do() with the assembled request, returning a new helixResp.

func (*Session) EndPoll

func (S *Session) EndPoll(bcastId, id, status string) *helixResp

EndPoll

func (*Session) EndPrediction

func (S *Session) EndPrediction(bcastId string, opts ...predictionsOption) *helixResp

EndPrediction

func (*Session) GetAllStreamTags

func (S *Session) GetAllStreamTags(opts ...tagsOpt) *helixResp

GetAllStreamTags

func (*Session) GetAutoModSettings

func (S *Session) GetAutoModSettings(bcastId, modId string) *helixResp

GetAutoModSettings

func (*Session) GetBannedUsers

func (S *Session) GetBannedUsers(bcastId string, opts ...moderationOpt) *helixResp

GetBannedUsers

func (*Session) GetBitsLeaderboard

func (S *Session) GetBitsLeaderboard(opts ...bitsOption) *helixResp

GetBitsLeaderboard

func (*Session) GetBlockedTerms

func (S *Session) GetBlockedTerms(bcastId, modId string, opts ...moderationOpt) *helixResp

GetBlockedTerms

func (*Session) GetBroadcasterSubscriptions

func (S *Session) GetBroadcasterSubscriptions(bcastId string, opts ...subsOpt) *helixResp

GetBroadcasterSubscriptions

func (*Session) GetChannelChatBadges

func (S *Session) GetChannelChatBadges(bcastId string) *helixResp

GetChannelChatBadges

func (*Session) GetChannelEditors

func (S *Session) GetChannelEditors(bcastId string) *helixResp

GetChannelEditors

func (*Session) GetChannelEmotes

func (S *Session) GetChannelEmotes(bcastId string) *helixResp

GetChannelEmotes

func (*Session) GetChannelFollowers

func (S *Session) GetChannelFollowers(bcastId string, opts ...channelsOpt) *helixResp

GetChannelFollowers

func (*Session) GetChannelICalendar

func (S *Session) GetChannelICalendar(bcastId string) *helixResp

GetChannelICalendar

func (*Session) GetChannelInformation

func (S *Session) GetChannelInformation(bcastIds ...string) *helixResp

GetChannelInformation

func (*Session) GetChannelStreamSchedule

func (S *Session) GetChannelStreamSchedule(bcastId string, opts ...scheduleOpt) *helixResp

GetChannelStreamSchedule

func (*Session) GetChannelTeams

func (S *Session) GetChannelTeams(bcastId string) *helixResp

GetChannelTeams

func (*Session) GetCharityCampaign

func (S *Session) GetCharityCampaign(bcastId string) *helixResp

GetCharityCampaign

func (*Session) GetCharityCampaignDonations

func (S *Session) GetCharityCampaignDonations(bcastId string, opts ...charityOpt) *helixResp

GetCharityCampaignDonations

func (*Session) GetChatSettings

func (S *Session) GetChatSettings(bcastId string, opts ...chatOpt) *helixResp

GetChatSettings

func (*Session) GetChatters

func (S *Session) GetChatters(bcastId, modId string, opts ...chatOpt) *helixResp

GetChatters

func (*Session) GetCheermotes

func (S *Session) GetCheermotes(bcastId string) *helixResp

GetCheermotes

func (*Session) GetClips

func (S *Session) GetClips(opts ...clipsOpt) *helixResp

func (*Session) GetCreatorGoals

func (S *Session) GetCreatorGoals(bcastId string) *helixResp

GetCreatorGoals

func (*Session) GetCustomReward

func (S *Session) GetCustomReward(bCastId, onlyManRewards string, ids ...string) *helixResp

GetCustomReward

func (*Session) GetCustomRewardRedemption

func (S *Session) GetCustomRewardRedemption(bcastId string, opts ...chanPointsOpt) *helixResp

GetCustomRewardRedemption

func (*Session) GetDropsEntitlements

func (S *Session) GetDropsEntitlements(opts ...entitlementsOpt) *helixResp

GetDropsEntitlements

func (*Session) GetEmoteSets

func (S *Session) GetEmoteSets(emoteSetIds ...string) *helixResp

GetEmoteSets

func (*Session) GetEventSubSubscriptions

func (S *Session) GetEventSubSubscriptions(opts ...eventSubOpt) *helixResp

GetEventSubSubscriptions

func (*Session) GetExtensionAnalytics

func (S *Session) GetExtensionAnalytics(opts ...analyticsOpt) *helixResp

GetExtensionAnalytics

func (*Session) GetExtensionBitsProducts

func (S *Session) GetExtensionBitsProducts(includeAll bool) *helixResp

GetExtensionBitsProducts

func (*Session) GetExtensionConfigurationSegment

func (S *Session) GetExtensionConfigurationSegment(opts ...extensionOpt) *helixResp

GetExtensionConfigurationSegment

func (*Session) GetExtensionLiveChannels

func (S *Session) GetExtensionLiveChannels(extId, after string, first int) *helixResp

GetExtensionLiveChannels

func (*Session) GetExtensionSecrets

func (S *Session) GetExtensionSecrets() *helixResp

GetExtensionSecrets

func (*Session) GetExtensionTransactions

func (S *Session) GetExtensionTransactions(opts ...bitsOption) *helixResp

GetExtensionTransactions

func (*Session) GetExtensions

func (S *Session) GetExtensions(extId, extVer string) *helixResp

GetExtensions

func (*Session) GetFollowedChannels

func (S *Session) GetFollowedChannels(userId string, opts ...channelsOpt) *helixResp

GetFollowedChannels

func (*Session) GetFollowedStreams

func (S *Session) GetFollowedStreams(userId string, opts ...streamsOpt) *helixResp

GetFollowedStreams

func (*Session) GetGameAnalytics

func (S *Session) GetGameAnalytics(opts ...analyticsOpt) *helixResp

GetGameAnalytics

func (*Session) GetGames

func (S *Session) GetGames(opts ...gamesOption) *helixResp

GetGames

func (*Session) GetGlobalChatBadges

func (S *Session) GetGlobalChatBadges() *helixResp

GetGlobalChatBadges

func (*Session) GetGlobalEmotes

func (S *Session) GetGlobalEmotes() *helixResp

GetGlobalEmotes

func (*Session) GetHypeTrainEvents

func (S *Session) GetHypeTrainEvents(bcastId string, opts ...hypeTrnOpt) *helixResp

GetHypeTrainEvents

func (*Session) GetModerators

func (S *Session) GetModerators(bcastId string, opts ...moderationOpt) *helixResp

GetModerators

func (*Session) GetPolls

func (S *Session) GetPolls(bcastId string, opts ...pollsOption) *helixResp

GetPolls

func (*Session) GetPredictions

func (S *Session) GetPredictions(bcastId string, opts ...predictionsOption) *helixResp

GetPredictions

func (*Session) GetReleasedExtensions

func (S *Session) GetReleasedExtensions(extId, extVer string) *helixResp

GetReleasedExtensions

func (*Session) GetShieldModeStatus

func (S *Session) GetShieldModeStatus(bcastId, modId string) *helixResp

GetShieldModeStatus

func (*Session) GetSoundtrackCurrentTrack

func (S *Session) GetSoundtrackCurrentTrack(bcastId string) *helixResp

GetSoundtrackCurrentTrack

func (*Session) GetSoundtrackPlaylist

func (S *Session) GetSoundtrackPlaylist(id string, opts ...musicOpt) *helixResp

GetSoundtrackPlaylist

func (*Session) GetSoundtrackPlaylists

func (S *Session) GetSoundtrackPlaylists(opts ...musicOpt) *helixResp

GetSoundtrackPlaylists

func (*Session) GetStreamKey

func (S *Session) GetStreamKey(bcasterId string) *helixResp

GetStreamKey

func (*Session) GetStreamMarkers

func (S *Session) GetStreamMarkers(opts ...streamsOpt) *helixResp

GetStreamMarkers

func (*Session) GetStreamTags

func (S *Session) GetStreamTags(bcastId string) *helixResp

GetStreamTags

func (*Session) GetStreams

func (S *Session) GetStreams(opts ...streamsOpt) *helixResp

GetStreams

func (*Session) GetTeams

func (S *Session) GetTeams(opts ...teamsOpt) *helixResp

GetTeams

func (*Session) GetTopGames

func (S *Session) GetTopGames(opts ...gamesOption) *helixResp

GetTopGames

func (*Session) GetUserActiveExtensions

func (S *Session) GetUserActiveExtensions(opts ...usersOpt) *helixResp

GetUserActiveExtensions

func (*Session) GetUserBlockList

func (S *Session) GetUserBlockList(bcastId string, opts ...usersOpt) *helixResp

GetUserBlockList

func (*Session) GetUserChatColor

func (S *Session) GetUserChatColor(userIds ...string) *helixResp

GetUserChatColor

func (*Session) GetUserExtensions

func (S *Session) GetUserExtensions() *helixResp

GetUserExtensions

func (*Session) GetUsers

func (S *Session) GetUsers(opts ...usersOpt) *helixResp

GetUsers

func (*Session) GetUsersFollows

func (S *Session) GetUsersFollows(opts ...usersOpt) *helixResp

GetUsersFollows Deprecation: This endpoint is deprecated and will be decommissioned on August 3, 2023. Access to this endpoint is limited to client IDs that have called the endpoint on or before February 17, 2023.

func (*Session) GetVIPs

func (S *Session) GetVIPs(bcastId string, opts ...moderationOpt) *helixResp

GetVIPs

func (*Session) GetVideos

func (S *Session) GetVideos(opts ...videosOpt) *helixResp

GetVideos

func (*Session) HasScope

func (S *Session) HasScope(scope string) bool

HasScope checks if the current Session (authorized id/token) has been granted the given scope.

func (*Session) Identity

func (S *Session) Identity() string

Identity returns any relevant information we have about the authenticated user. Currently a place-holder waiting to be implemented.

func (*Session) Load

func (S *Session) Load(ctx context.Context) bool

Load checks for a cached Session file, loading the data if present.

func (*Session) ManageHeldAutoModMessages

func (S *Session) ManageHeldAutoModMessages(userId, msgId, action string) *helixResp

ManageHeldAutoModMessages

func (*Session) ModifyChannelInformation

func (S *Session) ModifyChannelInformation(bcastrId string, opts ...channelsOpt) *helixResp

ModifyChannelInformation

func (*Session) RemoveBlockedTerm

func (S *Session) RemoveBlockedTerm(bcastId, modId, id string) *helixResp

RemoveBlockedTerm

func (*Session) RemoveChannelModerator

func (S *Session) RemoveChannelModerator(bcastId, userId string) *helixResp

RemoveChannelModerator

func (*Session) RemoveChannelVIP

func (S *Session) RemoveChannelVIP(bcastId, userId string) *helixResp

RemoveChannelVIP

func (*Session) Save

func (S *Session) Save() error

Save writes the current session to a gob file in the user's cache directory. The authed user's client id and a label of the user's chosing will be used for the file name. Ex. 'TheLabel-z9b0<TheClientId>uuurgq4fffn2o'

func (*Session) SearchCategories

func (S *Session) SearchCategories(query string, opts ...searchOption) *helixResp

SearchCategories

func (*Session) SearchChannels

func (S *Session) SearchChannels(query string, opts ...searchOption) *helixResp

SearchChannels

func (*Session) SendChatAnnouncement

func (S *Session) SendChatAnnouncement(bcastId, modId string, opts ...chatOpt) *helixResp

SendChatAnnouncement

func (*Session) SendExtensionChatMessage

func (S *Session) SendExtensionChatMessage(bcastId string, opts ...extensionOpt) *helixResp

SendExtensionChatMessage

func (*Session) SendExtensionPubSubMessage

func (S *Session) SendExtensionPubSubMessage(opts ...extensionOpt) *helixResp

SendExtensionPubSubMessage

func (*Session) SendShoutout

func (S *Session) SendShoutout(frmBcastId, toBcastId, modId string) *helixResp

SendShoutout

func (*Session) SendWhisper

func (S *Session) SendWhisper(frmUsrId, toUsrId, mess string) *helixResp

SendWhisper

func (*Session) SetExtensionConfigurationSegment

func (S *Session) SetExtensionConfigurationSegment(opts ...extensionOpt) *helixResp

SetExtensionConfigurationSegment

func (*Session) SetExtensionRequiredConfiguration

func (S *Session) SetExtensionRequiredConfiguration(bcastId string, opts ...extensionOpt) *helixResp

SetExtensionRequiredConfiguration

func (*Session) StartCommercial

func (S *Session) StartCommercial(bcastId string, length int) *helixResp

StartCommercial

func (*Session) StartRaid

func (S *Session) StartRaid(frmBcastId, toBcastId string) *helixResp

StartRaid

func (*Session) UnbanUser

func (S *Session) UnbanUser(bcastId, modId, userId string) *helixResp

UnbanUser

func (*Session) UnblockUser

func (S *Session) UnblockUser(targetUserId string) *helixResp

UnblockUser

func (*Session) UpdateAutoModSettings

func (S *Session) UpdateAutoModSettings(opts ...moderationOpt) *helixResp

UpdateAutoModSettings - incomplete

func (*Session) UpdateChannelStreamSchedule

func (S *Session) UpdateChannelStreamSchedule(bcastId string, opts ...scheduleOpt) *helixResp

UpdateChannelStreamSchedule

func (*Session) UpdateChannelStreamScheduleSegment

func (S *Session) UpdateChannelStreamScheduleSegment(bcastId, id string, opts ...scheduleOpt) *helixResp

UpdateChannelStreamScheduleSegment

func (*Session) UpdateChatSettings

func (S *Session) UpdateChatSettings(bcastId, modId string, opts ...chatOpt) *helixResp

UpdateChatSettings

func (*Session) UpdateCustomReward

func (S *Session) UpdateCustomReward(bcastId, id string, opts ...chanPointsOpt) *helixResp

UpdateCustomReward

func (*Session) UpdateDropsEntitlements

func (S *Session) UpdateDropsEntitlements(opts ...entitlementsOpt) *helixResp

UpdateDropsEntitlements

func (*Session) UpdateExtensionBitsProduct

func (S *Session) UpdateExtensionBitsProduct(opts ...extensionOpt) *helixResp

UpdateExtensionBitsProduct

func (*Session) UpdateRedemptionStatus

func (S *Session) UpdateRedemptionStatus(bcastId, rewardId, status string, ids ...string) *helixResp

UpdateRedemptionStatus

func (*Session) UpdateShieldModeStatus

func (S *Session) UpdateShieldModeStatus(bcastId, modId string, active bool) *helixResp

UpdateShieldModeStatus

func (*Session) UpdateUser

func (S *Session) UpdateUser(description string) *helixResp

UpdateUser

func (*Session) UpdateUserChatColor

func (S *Session) UpdateUserChatColor(userId, color string) *helixResp

UpdateUserChatColor

func (*Session) UpdateUserExtensions

func (S *Session) UpdateUserExtensions(opts ...usersOpt) *helixResp

UpdateUserExtensions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL