sceneitems

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*requests.Client
}

Client represents a client for 'scene items' requests

func (*Client) DeleteSceneItem

func (c *Client) DeleteSceneItem(params *DeleteSceneItemParams) (*DeleteSceneItemResponse, error)

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

func (*Client) DuplicateSceneItem

func (c *Client) DuplicateSceneItem(
	params *DuplicateSceneItemParams,
) (*DuplicateSceneItemResponse, error)

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

func (*Client) GetSceneItemProperties

func (c *Client) GetSceneItemProperties(
	params *GetSceneItemPropertiesParams,
) (*GetSceneItemPropertiesResponse, error)

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

func (*Client) ResetSceneItem

func (c *Client) ResetSceneItem(params *ResetSceneItemParams) (*ResetSceneItemResponse, error)

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

func (*Client) SetSceneItemProperties

func (c *Client) SetSceneItemProperties(
	params *SetSceneItemPropertiesParams,
) (*SetSceneItemPropertiesResponse, error)

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

type DeleteSceneItemParams

type DeleteSceneItemParams struct {
	requests.ParamsBasic

	Item struct {
		// id of the scene item.
		Id int `json:"id"`

		// name of the scene item (prefer `id`, including both is acceptable).
		Name string `json:"name"`
	} `json:"item"`

	// Name of the scene the source belongs to. Defaults to the current scene.
	Scene string `json:"scene"`
}

DeleteSceneItemParams represents the params body for the "DeleteSceneItem" request. Deletes a scene item.

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

func (*DeleteSceneItemParams) Name

func (o *DeleteSceneItemParams) Name() string

Name just returns "DeleteSceneItem".

type DeleteSceneItemResponse

type DeleteSceneItemResponse struct {
	requests.ResponseBasic
}

DeleteSceneItemResponse represents the response body for the "DeleteSceneItem" request. Deletes a scene item.

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

type DuplicateSceneItemParams

type DuplicateSceneItemParams struct {
	requests.ParamsBasic

	// Name of the scene to copy the item from. Defaults to the current scene.
	FromScene string `json:"fromScene"`

	Item struct {
		// id of the scene item.
		Id int `json:"id"`

		// name of the scene item (prefer `id`, including both is acceptable).
		Name string `json:"name"`
	} `json:"item"`

	// Name of the scene to create the item in. Defaults to the current scene.
	ToScene string `json:"toScene"`
}

DuplicateSceneItemParams represents the params body for the "DuplicateSceneItem" request. Duplicates a scene item.

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

func (*DuplicateSceneItemParams) Name

func (o *DuplicateSceneItemParams) Name() string

Name just returns "DuplicateSceneItem".

type DuplicateSceneItemResponse

type DuplicateSceneItemResponse struct {
	requests.ResponseBasic

	Item struct {
		// New item ID
		Id int `json:"id"`

		// New item name
		Name string `json:"name"`
	} `json:"item"`

	// Name of the scene where the new item was created
	Scene string `json:"scene"`
}

DuplicateSceneItemResponse represents the response body for the "DuplicateSceneItem" request. Duplicates a scene item.

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

type GetSceneItemPropertiesParams

type GetSceneItemPropertiesParams struct {
	requests.ParamsBasic

	// The name of the source.
	Item string `json:"item"`

	// the name of the scene that the source item belongs to. Defaults to the current scene.
	SceneName string `json:"scene-name"`
}

GetSceneItemPropertiesParams represents the params body for the "GetSceneItemProperties" request. Gets the scene specific properties of the specified source item.

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

func (*GetSceneItemPropertiesParams) Name

Name just returns "GetSceneItemProperties".

type GetSceneItemPropertiesResponse

type GetSceneItemPropertiesResponse struct {
	requests.ResponseBasic

	Bounds struct {
		// Alignment of the bounding box.
		Alignment int `json:"alignment"`

		// Type of bounding box.
		Type string `json:"type"`

		// Width of the bounding box.
		X float64 `json:"x"`

		// Height of the bounding box.
		Y float64 `json:"y"`
	} `json:"bounds"`

	Crop struct {
		// The number of pixels cropped off the bottom of the source before scaling.
		Bottom int `json:"bottom"`

		// The number of pixels cropped off the left of the source before scaling.
		Left int `json:"left"`

		// The number of pixels cropped off the right of the source before scaling.
		Right int `json:"right"`

		// The number of pixels cropped off the top of the source before scaling.
		Top int `json:"top"`
	} `json:"crop"`

	// The name of the source.
	Name string `json:"name"`

	Position struct {
		// The point on the source that the item is manipulated from.
		Alignment float64 `json:"alignment"`

		// The x position of the source from the left.
		X float64 `json:"x"`

		// The y position of the source from the top.
		Y float64 `json:"y"`
	} `json:"position"`

	// The clockwise rotation of the item in degrees around the point of alignment.
	Rotation float64 `json:"rotation"`

	Scale struct {
		// The x-scale factor of the source.
		X float64 `json:"x"`

		// The y-scale factor of the source.
		Y float64 `json:"y"`
	} `json:"scale"`

	// If the source is visible.
	Visible bool `json:"visible"`
}

GetSceneItemPropertiesResponse represents the response body for the "GetSceneItemProperties" request. Gets the scene specific properties of the specified source item.

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

type ResetSceneItemParams

type ResetSceneItemParams struct {
	requests.ParamsBasic

	// Name of the source item.
	Item string `json:"item"`

	// Name of the scene the source belongs to. Defaults to the current scene.
	SceneName string `json:"scene-name"`
}

ResetSceneItemParams represents the params body for the "ResetSceneItem" request. Reset a scene item.

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

func (*ResetSceneItemParams) Name

func (o *ResetSceneItemParams) Name() string

Name just returns "ResetSceneItem".

type ResetSceneItemResponse

type ResetSceneItemResponse struct {
	requests.ResponseBasic
}

ResetSceneItemResponse represents the response body for the "ResetSceneItem" request. Reset a scene item.

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

type SetSceneItemPropertiesParams

type SetSceneItemPropertiesParams struct {
	requests.ParamsBasic

	Bounds struct {
		// The new alignment of the bounding box. (0-2, 4-6, 8-10)
		Alignment int `json:"alignment"`

		// The new bounds type of the source.
		Type string `json:"type"`

		// The new width of the bounding box.
		X float64 `json:"x"`

		// The new height of the bounding box.
		Y float64 `json:"y"`
	} `json:"bounds"`

	Crop struct {
		// The new amount of pixels cropped off the bottom of the source before scaling.
		Bottom int `json:"bottom"`

		// The new amount of pixels cropped off the left of the source before scaling.
		Left int `json:"left"`

		// The new amount of pixels cropped off the right of the source before scaling.
		Right int `json:"right"`

		// The new amount of pixels cropped off the top of the source before scaling.
		Top int `json:"top"`
	} `json:"crop"`

	// The name of the source.
	Item string `json:"item"`

	Position struct {
		// The new alignment of the source.
		Alignment float64 `json:"alignment"`

		// The new x position of the source.
		X float64 `json:"x"`

		// The new y position of the source.
		Y float64 `json:"y"`
	} `json:"position"`

	// The new clockwise rotation of the item in degrees.
	Rotation float64 `json:"rotation"`

	Scale struct {
		// The new x scale of the item.
		X float64 `json:"x"`

		// The new y scale of the item.
		Y float64 `json:"y"`
	} `json:"scale"`

	// the name of the scene that the source item belongs to. Defaults to the current scene.
	SceneName string `json:"scene-name"`

	// The new visibility of the source. 'true' shows source, 'false' hides source.
	Visible bool `json:"visible"`
}

SetSceneItemPropertiesParams represents the params body for the "SetSceneItemProperties" request. Sets the scene specific properties of a source. Unspecified properties will remain unchanged.

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

func (*SetSceneItemPropertiesParams) Name

Name just returns "SetSceneItemProperties".

type SetSceneItemPropertiesResponse

type SetSceneItemPropertiesResponse struct {
	requests.ResponseBasic
}

SetSceneItemPropertiesResponse represents the response body for the "SetSceneItemProperties" request. Sets the scene specific properties of a source. Unspecified properties will remain unchanged.

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

Jump to

Keyboard shortcuts

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