api

package
v0.0.0-...-a90a58e Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TwitchScope                          = "" /* 150-byte string literal not displayed */
	EventsubPayloadTypeStreamOnline      = "stream.online"
	EventsubPayloadTypeChannelRedemption = "channel.channel_points_custom_reward_redemption.add"
)
View Source
const (
	EventsubMessageIDHeaderKey                = "Twitch-Eventsub-Message-Id"
	EventsubMessageTimestampHeaderKey         = "Twitch-Eventsub-Message-Timestamp"
	EventsubMessageSignatureHeaderKey         = "Twitch-Eventsub-Message-Signature"
	EventsubMessageTypeHeaderKey              = "Twitch-Eventsub-Message-Type"
	EventsubSubscriptionTypeChannelRedemption = "channel.channel_points_custom_reward_redemption.add"
	EventsubSubscriptionTypeStreamOnline      = "stream.online"
	EventsubSubscriptionTypeStreamOffline     = "stream.offline"
	EventsubSubscriptionTypeFollow            = "channel.follow"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(config util.Config, store db.Store) (*Server, error)

func (*Server) Start

func (server *Server) Start(address string) error

type WsMessage

type WsMessage struct {
	Type string `json:"type"`
	Data string `json:"data"`
}

type WsMessageData

type WsMessageData struct {
	Channel         string `json:"channel"`
	UserName        string `json:"user_name"`
	UserLogin       string `json:"user_login"`
	Followers       int    `json:"followers"`
	ProfileImageUrl string `json:"profile_image_url"`
	LastSeenPlaying string `json:"last_seen_playing"`
}

type WsURI

type WsURI struct {
	ID string `uri:"id" binding:"required"`
}

Jump to

Keyboard shortcuts

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