general

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticateParams

type AuthenticateParams struct {
	requests.ParamsBasic

	// Response to the auth challenge (see "Authentication" for more information).
	Auth string `json:"auth"`
}

AuthenticateParams represents the params body for the "Authenticate" request. Attempt to authenticate the client to the server.

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#Authenticate.

func (*AuthenticateParams) Name

func (o *AuthenticateParams) Name() string

Name just returns "Authenticate".

type AuthenticateResponse

type AuthenticateResponse struct {
	requests.ResponseBasic
}

AuthenticateResponse represents the response body for the "Authenticate" request. Attempt to authenticate the client to the server.

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#Authenticate.

type BroadcastCustomMessageParams added in v0.3.0

type BroadcastCustomMessageParams struct {
	requests.ParamsBasic

	// User-defined data
	Data map[string]interface{} `json:"data"`

	// Identifier to be choosen by the client
	Realm string `json:"realm"`
}

BroadcastCustomMessageParams represents the params body for the "BroadcastCustomMessage" request. Broadcast custom message to all connected WebSocket clients

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#BroadcastCustomMessage.

func (*BroadcastCustomMessageParams) Name added in v0.3.0

Name just returns "BroadcastCustomMessage".

type BroadcastCustomMessageResponse added in v0.3.0

type BroadcastCustomMessageResponse struct {
	requests.ResponseBasic
}

BroadcastCustomMessageResponse represents the response body for the "BroadcastCustomMessage" request. Broadcast custom message to all connected WebSocket clients

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#BroadcastCustomMessage.

type Client

type Client struct {
	*requests.Client
}

Client represents a client for 'general' requests

func (*Client) Authenticate

func (c *Client) Authenticate(params *AuthenticateParams) (*AuthenticateResponse, error)

Authenticate sends the corresponding request to the connected OBS WebSockets server.

func (*Client) BroadcastCustomMessage added in v0.3.0

func (c *Client) BroadcastCustomMessage(
	params *BroadcastCustomMessageParams,
) (*BroadcastCustomMessageResponse, error)

BroadcastCustomMessage sends the corresponding request to the connected OBS WebSockets server.

func (*Client) GetAuthRequired

func (c *Client) GetAuthRequired(
	paramss ...*GetAuthRequiredParams,
) (*GetAuthRequiredResponse, error)

GetAuthRequired sends the corresponding request to the connected OBS WebSockets server. Note the variadic arguments as this request doesn't require any parameters.

func (*Client) GetFilenameFormatting

func (c *Client) GetFilenameFormatting(
	paramss ...*GetFilenameFormattingParams,
) (*GetFilenameFormattingResponse, error)

GetFilenameFormatting sends the corresponding request to the connected OBS WebSockets server. Note the variadic arguments as this request doesn't require any parameters.

func (*Client) GetStats added in v0.2.0

func (c *Client) GetStats(paramss ...*GetStatsParams) (*GetStatsResponse, error)

GetStats sends the corresponding request to the connected OBS WebSockets server. Note the variadic arguments as this request doesn't require any parameters.

func (*Client) GetVersion

func (c *Client) GetVersion(paramss ...*GetVersionParams) (*GetVersionResponse, error)

GetVersion sends the corresponding request to the connected OBS WebSockets server. Note the variadic arguments as this request doesn't require any parameters.

func (*Client) GetVideoInfo added in v0.2.0

func (c *Client) GetVideoInfo(paramss ...*GetVideoInfoParams) (*GetVideoInfoResponse, error)

GetVideoInfo sends the corresponding request to the connected OBS WebSockets server. Note the variadic arguments as this request doesn't require any parameters.

func (*Client) SetFilenameFormatting

func (c *Client) SetFilenameFormatting(
	params *SetFilenameFormattingParams,
) (*SetFilenameFormattingResponse, error)

SetFilenameFormatting sends the corresponding request to the connected OBS WebSockets server.

func (*Client) SetHeartbeat

func (c *Client) SetHeartbeat(params *SetHeartbeatParams) (*SetHeartbeatResponse, error)

SetHeartbeat sends the corresponding request to the connected OBS WebSockets server.

type GetAuthRequiredParams

type GetAuthRequiredParams struct {
	requests.ParamsBasic
}

GetAuthRequiredParams represents the params body for the "GetAuthRequired" request. Tells the client if authentication is required. If so, returns authentication parameters `challenge` and `salt` (see "Authentication" for more information).

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#GetAuthRequired.

func (*GetAuthRequiredParams) Name

func (o *GetAuthRequiredParams) Name() string

Name just returns "GetAuthRequired".

type GetAuthRequiredResponse

type GetAuthRequiredResponse struct {
	requests.ResponseBasic

	// Indicates whether authentication is required.
	AuthRequired bool `json:"authRequired"`

	Challenge string `json:"challenge"`

	Salt string `json:"salt"`
}

GetAuthRequiredResponse represents the response body for the "GetAuthRequired" request. Tells the client if authentication is required. If so, returns authentication parameters `challenge` and `salt` (see "Authentication" for more information).

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#GetAuthRequired.

type GetFilenameFormattingParams

type GetFilenameFormattingParams struct {
	requests.ParamsBasic
}

GetFilenameFormattingParams represents the params body for the "GetFilenameFormatting" request. Get the filename formatting string

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#GetFilenameFormatting.

func (*GetFilenameFormattingParams) Name

Name just returns "GetFilenameFormatting".

type GetFilenameFormattingResponse

type GetFilenameFormattingResponse struct {
	requests.ResponseBasic

	// Current filename formatting string.
	FilenameFormatting string `json:"filename-formatting"`
}

GetFilenameFormattingResponse represents the response body for the "GetFilenameFormatting" request. Get the filename formatting string

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#GetFilenameFormatting.

type GetStatsParams added in v0.2.0

type GetStatsParams struct {
	requests.ParamsBasic
}

GetStatsParams represents the params body for the "GetStats" request. Get OBS stats (almost the same info as provided in OBS' stats window)

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#GetStats.

func (*GetStatsParams) Name added in v0.2.0

func (o *GetStatsParams) Name() string

Name just returns "GetStats".

type GetStatsResponse added in v0.2.0

type GetStatsResponse struct {
	requests.ResponseBasic

	// OBS stats
	Stats []typedefs.OBSStats `json:"stats"`
}

GetStatsResponse represents the response body for the "GetStats" request. Get OBS stats (almost the same info as provided in OBS' stats window)

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#GetStats.

type GetVersionParams

type GetVersionParams struct {
	requests.ParamsBasic
}

GetVersionParams represents the params body for the "GetVersion" request. Returns the latest version of the plugin and the API.

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#GetVersion.

func (*GetVersionParams) Name

func (o *GetVersionParams) Name() string

Name just returns "GetVersion".

type GetVersionResponse

type GetVersionResponse struct {
	requests.ResponseBasic

	// List of available request types, formatted as a comma-separated list string (e.g. :
	// "Method1,Method2,Method3").
	AvailableRequests string `json:"available-requests"`

	// OBS Studio program version.
	ObsStudioVersion string `json:"obs-studio-version"`

	// obs-websocket plugin version.
	ObsWebsocketVersion string `json:"obs-websocket-version"`

	// OBSRemote compatible API version. Fixed to 1.1 for retrocompatibility.
	Version float64 `json:"version"`
}

GetVersionResponse represents the response body for the "GetVersion" request. Returns the latest version of the plugin and the API.

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#GetVersion.

type GetVideoInfoParams added in v0.2.0

type GetVideoInfoParams struct {
	requests.ParamsBasic
}

GetVideoInfoParams represents the params body for the "GetVideoInfo" request. Get basic OBS video information

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#GetVideoInfo.

func (*GetVideoInfoParams) Name added in v0.2.0

func (o *GetVideoInfoParams) Name() string

Name just returns "GetVideoInfo".

type GetVideoInfoResponse added in v0.2.0

type GetVideoInfoResponse struct {
	requests.ResponseBasic

	// Base (canvas) height
	BaseHeight int `json:"baseHeight"`

	// Base (canvas) width
	BaseWidth int `json:"baseWidth"`

	// Color range (full or partial)
	ColorRange string `json:"colorRange"`

	// Color space for YUV
	ColorSpace string `json:"colorSpace"`

	// Frames rendered per second
	Fps float64 `json:"fps"`

	// Output height
	OutputHeight int `json:"outputHeight"`

	// Output width
	OutputWidth int `json:"outputWidth"`

	// Scaling method used if output size differs from base size
	ScaleType string `json:"scaleType"`

	// Video color format
	VideoFormat string `json:"videoFormat"`
}

GetVideoInfoResponse represents the response body for the "GetVideoInfo" request. Get basic OBS video information

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#GetVideoInfo.

type SetFilenameFormattingParams

type SetFilenameFormattingParams struct {
	requests.ParamsBasic

	// Filename formatting string to set.
	FilenameFormatting string `json:"filename-formatting"`
}

SetFilenameFormattingParams represents the params body for the "SetFilenameFormatting" request. Set the filename formatting string

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#SetFilenameFormatting.

func (*SetFilenameFormattingParams) Name

Name just returns "SetFilenameFormatting".

type SetFilenameFormattingResponse

type SetFilenameFormattingResponse struct {
	requests.ResponseBasic
}

SetFilenameFormattingResponse represents the response body for the "SetFilenameFormatting" request. Set the filename formatting string

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#SetFilenameFormatting.

type SetHeartbeatParams

type SetHeartbeatParams struct {
	requests.ParamsBasic

	// Starts/Stops emitting heartbeat messages
	Enable bool `json:"enable"`
}

SetHeartbeatParams represents the params body for the "SetHeartbeat" request. Enable/disable sending of the Heartbeat event

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#SetHeartbeat.

func (*SetHeartbeatParams) Name

func (o *SetHeartbeatParams) Name() string

Name just returns "SetHeartbeat".

type SetHeartbeatResponse

type SetHeartbeatResponse struct {
	requests.ResponseBasic
}

SetHeartbeatResponse represents the response body for the "SetHeartbeat" request. Enable/disable sending of the Heartbeat event

Generated from https://github.com/Palakis/obs-websocket/blob/4.7.0/docs/generated/protocol.md#SetHeartbeat.

Jump to

Keyboard shortcuts

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