1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
// This file has been automatically generated. Don't edit it.
package sceneitems
import requests "github.com/andreykaipov/goobs/api/requests"
/*
AddSceneItemParams represents the params body for the "AddSceneItem" request.
Creates a scene item in a scene. In other words, this is how you add a source into a scene.
Since 4.9.0.
*/
type AddSceneItemParams struct {
requests.ParamsBasic
// Name of the scene to create the scene item in
SceneName string `json:"sceneName,omitempty"`
// Whether to make the sceneitem visible on creation or not. Default `true`
SetVisible *bool `json:"setVisible,omitempty"`
// Name of the source to be added
SourceName string `json:"sourceName,omitempty"`
}
// GetSelfName just returns "AddSceneItem".
func (o *AddSceneItemParams) GetSelfName() string {
return "AddSceneItem"
}
/*
AddSceneItemResponse represents the response body for the "AddSceneItem" request.
Creates a scene item in a scene. In other words, this is how you add a source into a scene.
Since v4.9.0.
*/
type AddSceneItemResponse struct {
requests.ResponseBasic
// Numerical ID of the created scene item
ItemId int `json:"itemId,omitempty"`
}
// AddSceneItem sends the corresponding request to the connected OBS WebSockets server.
func (c *Client) AddSceneItem(params *AddSceneItemParams) (*AddSceneItemResponse, error) {
data := &AddSceneItemResponse{}
if err := c.SendRequest(params, data); err != nil {
return nil, err
}
return data, nil
}
|