-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathencoding_live_api.go
34 lines (27 loc) · 1.11 KB
/
encoding_live_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
package api
import (
"github.com/bitmovin/bitmovin-api-sdk-go/apiclient"
)
// EncodingLiveAPI intermediary API object with no endpoints
type EncodingLiveAPI struct {
apiClient *apiclient.APIClient
// StreamKeys communicates with '/encoding/live/stream-keys' endpoints
StreamKeys *EncodingLiveStreamKeysAPI
// StandbyPools communicates with '/encoding/live/standby-pools' endpoints
StandbyPools *EncodingLiveStandbyPoolsAPI
}
// NewEncodingLiveAPI constructor for EncodingLiveAPI that takes options as argument
func NewEncodingLiveAPI(options ...apiclient.APIClientOption) (*EncodingLiveAPI, error) {
apiClient, err := apiclient.NewAPIClient(options...)
if err != nil {
return nil, err
}
return NewEncodingLiveAPIWithClient(apiClient), nil
}
// NewEncodingLiveAPIWithClient constructor for EncodingLiveAPI that takes an APIClient as argument
func NewEncodingLiveAPIWithClient(apiClient *apiclient.APIClient) *EncodingLiveAPI {
a := &EncodingLiveAPI{apiClient: apiClient}
a.StreamKeys = NewEncodingLiveStreamKeysAPIWithClient(apiClient)
a.StandbyPools = NewEncodingLiveStandbyPoolsAPIWithClient(apiClient)
return a
}