File: xx_generated.duplicatesceneitem.go

package info (click to toggle)
golang-github-andreykaipov-goobs 0.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,228 kB
  • sloc: makefile: 32
file content (55 lines) | stat: -rw-r--r-- 1,603 bytes parent folder | download
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
50
51
52
53
54
55
// This file has been automatically generated. Don't edit it.

package sceneitems

import (
	requests "github.com/andreykaipov/goobs/api/requests"
	typedefs "github.com/andreykaipov/goobs/api/typedefs"
)

/*
DuplicateSceneItemParams represents the params body for the "DuplicateSceneItem" request.
Duplicates a scene item.
Since 4.5.0.
*/
type DuplicateSceneItemParams struct {
	requests.ParamsBasic

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

	// The item specification for this object.
	Item *typedefs.Item `json:"item,omitempty"`

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

// GetSelfName just returns "DuplicateSceneItem".
func (o *DuplicateSceneItemParams) GetSelfName() string {
	return "DuplicateSceneItem"
}

/*
DuplicateSceneItemResponse represents the response body for the "DuplicateSceneItem" request.
Duplicates a scene item.
Since v4.5.0.
*/
type DuplicateSceneItemResponse struct {
	requests.ResponseBasic

	// The item specification for this object.
	Item *typedefs.Item `json:"item,omitempty"`

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

// DuplicateSceneItem sends the corresponding request to the connected OBS WebSockets server.
func (c *Client) DuplicateSceneItem(params *DuplicateSceneItemParams) (*DuplicateSceneItemResponse, error) {
	data := &DuplicateSceneItemResponse{}
	if err := c.SendRequest(params, data); err != nil {
		return nil, err
	}
	return data, nil
}