| 1 | // This file has been automatically generated. Don't edit it. |
| 2 | |
| 3 | package recordingscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/recording`/ |
| 4 | |
| 5 | import requestsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests`/ "github.com/andreykaipov/goobs/api/requestsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests`/" |
| 6 | |
| 7 | /* |
| 8 | StartRecordingParams represents the params body for the "StartRecording" request. |
| 9 | Start recording. |
| 10 | Will return an `error` if recording is already active. |
| 11 | Since 4.1.0. |
| 12 | */ |
| 13 | type StartRecordingParamsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/recording`/StartRecordingParams# struct { |
| 14 | requestsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests`/.ParamsBasicscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/recording`/StartRecordingParams#ParamsBasic. |
| 15 | } |
| 16 | |
| 17 | // GetSelfName just returns "StartRecording". |
| 18 | func (o *StartRecordingParamsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/recording`/StartRecordingParams#) GetSelfNamescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/recording`/StartRecordingParams#GetSelfName().() string { |
| 19 | return "StartRecording" |
| 20 | } |
| 21 | |
| 22 | /* |
| 23 | StartRecordingResponse represents the response body for the "StartRecording" request. |
| 24 | Start recording. |
| 25 | Will return an `error` if recording is already active. |
| 26 | Since v4.1.0. |
| 27 | */ |
| 28 | type StartRecordingResponsescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/recording`/StartRecordingResponse# struct { |
| 29 | requestsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests`/.ResponseBasicscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/recording`/StartRecordingResponse#ResponseBasic. |
| 30 | } |
| 31 | |
| 32 | // StartRecording sends the corresponding request to the connected OBS WebSockets server. Note the variadic arguments as |
| 33 | // this request doesn't require any parameters. |
| 34 | func (c *Clientscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/recording`/Client#) StartRecordingscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/recording`/Client#StartRecording().(paramss ...*StartRecordingParamsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/recording`/StartRecordingParams#) (*StartRecordingResponsescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/recording`/StartRecordingResponse#, error) { |
| 35 | if len(paramss) == 0 { |
| 36 | paramss = []*StartRecordingParamsscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/recording`/StartRecordingParams#{{}} |
| 37 | } |
| 38 | params := paramss[0] |
| 39 | data := &StartRecordingResponsescip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests/recording`/StartRecordingResponse#{} |
| 40 | if err := c.SendRequestscip-go gomod github.com/andreykaipov/goobs . `github.com/andreykaipov/goobs/api/requests`/Client#SendRequest().(params, data); err != nil { |
| 41 | return nil, err |
| 42 | } |
| 43 | return data, nil |
| 44 | } |