File: xx_generated.getcurrenttransition.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 (48 lines) | stat: -rw-r--r-- 1,537 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
// This file has been automatically generated. Don't edit it.

package transitions

import requests "github.com/andreykaipov/goobs/api/requests"

/*
GetCurrentTransitionParams represents the params body for the "GetCurrentTransition" request.
Get the name of the currently selected transition in the frontend's dropdown menu.
Since 0.3.
*/
type GetCurrentTransitionParams struct {
	requests.ParamsBasic
}

// GetSelfName just returns "GetCurrentTransition".
func (o *GetCurrentTransitionParams) GetSelfName() string {
	return "GetCurrentTransition"
}

/*
GetCurrentTransitionResponse represents the response body for the "GetCurrentTransition" request.
Get the name of the currently selected transition in the frontend's dropdown menu.
Since v0.3.
*/
type GetCurrentTransitionResponse struct {
	requests.ResponseBasic

	// Transition duration (in milliseconds) if supported by the transition.
	Duration int `json:"duration,omitempty"`

	// Name of the selected transition.
	Name string `json:"name,omitempty"`
}

// GetCurrentTransition sends the corresponding request to the connected OBS WebSockets server. Note the variadic
// arguments as this request doesn't require any parameters.
func (c *Client) GetCurrentTransition(paramss ...*GetCurrentTransitionParams) (*GetCurrentTransitionResponse, error) {
	if len(paramss) == 0 {
		paramss = []*GetCurrentTransitionParams{{}}
	}
	params := paramss[0]
	data := &GetCurrentTransitionResponse{}
	if err := c.SendRequest(params, data); err != nil {
		return nil, err
	}
	return data, nil
}