-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathencoding_encodings_streams_customdata_api.go
39 lines (32 loc) · 1.59 KB
/
encoding_encodings_streams_customdata_api.go
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
package api
import (
"github.com/bitmovin/bitmovin-api-sdk-go/apiclient"
"github.com/bitmovin/bitmovin-api-sdk-go/model"
)
// EncodingEncodingsStreamsCustomdataAPI communicates with '/encoding/encodings/{encoding_id}/streams/{stream_id}/customData' endpoints
type EncodingEncodingsStreamsCustomdataAPI struct {
apiClient *apiclient.APIClient
}
// NewEncodingEncodingsStreamsCustomdataAPI constructor for EncodingEncodingsStreamsCustomdataAPI that takes options as argument
func NewEncodingEncodingsStreamsCustomdataAPI(options ...apiclient.APIClientOption) (*EncodingEncodingsStreamsCustomdataAPI, error) {
apiClient, err := apiclient.NewAPIClient(options...)
if err != nil {
return nil, err
}
return NewEncodingEncodingsStreamsCustomdataAPIWithClient(apiClient), nil
}
// NewEncodingEncodingsStreamsCustomdataAPIWithClient constructor for EncodingEncodingsStreamsCustomdataAPI that takes an APIClient as argument
func NewEncodingEncodingsStreamsCustomdataAPIWithClient(apiClient *apiclient.APIClient) *EncodingEncodingsStreamsCustomdataAPI {
a := &EncodingEncodingsStreamsCustomdataAPI{apiClient: apiClient}
return a
}
// Get Stream Custom Data
func (api *EncodingEncodingsStreamsCustomdataAPI) Get(encodingId string, streamId string) (*model.CustomData, error) {
reqParams := func(params *apiclient.RequestParams) {
params.PathParams["encoding_id"] = encodingId
params.PathParams["stream_id"] = streamId
}
var responseModel model.CustomData
err := api.apiClient.Get("/encoding/encodings/{encoding_id}/streams/{stream_id}/customData", nil, &responseModel, reqParams)
return &responseModel, err
}