api

package
v0.0.0-...-3cc618a Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateWebhooks

func CreateWebhooks(ctx context.Context, streamerID string, hooks ...Hook) error

func RevokeWebhook

func RevokeWebhook(ctx context.Context, streamerID string, hooks ...Hook) error

Types

type Hook

type Hook struct {
	Name    string
	Version string
}

type TwitchCallbackTransport

type TwitchCallbackTransport struct {
	Method   string `json:"method"`
	Callback string `json:"callback"`
	Secret   string `json:"secret"`
}

type TwitchUser

type TwitchUser struct {
	ID              string    `json:"id"`
	Login           string    `json:"login"`
	DisplayName     string    `json:"display_name"`
	BroadcasterType string    `json:"broadcaster_type"`
	Description     string    `json:"description"`
	ProfileImageURL string    `json:"profile_image_url"`
	OfflineImageURL string    `json:"offline_image_url"`
	ViewCount       int       `json:"view_count"`
	CreatedAt       time.Time `json:"created_at"`
}

func GetUsers

func GetUsers(ctx context.Context, oauth string, ids []string, logins []string) ([]TwitchUser, error)

type TwitchUserResp

type TwitchUserResp struct {
	Data []TwitchUser `json:"data"`
}

type TwitchWebhookRequest

type TwitchWebhookRequest struct {
	Type      string                  `json:"type"`
	Version   string                  `json:"version"`
	Condition map[string]interface{}  `json:"condition"`
	Transport TwitchCallbackTransport `json:"transport"`
}

Jump to

Keyboard shortcuts

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