forked from muxinc/mux-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added go module * updated generated code * test updates * docs + code gen * clip test * removed gopkg; did a go mod vendor * updated ci workflow to no longer use dep
- Loading branch information
Showing
42 changed files
with
458 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
golang 1.15.6 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// Mux Go - Copyright 2019 Mux Inc. | ||
// NOTE: This file is auto generated. Do not edit this file manually. | ||
|
||
package muxgo | ||
|
||
import ( | ||
"fmt" | ||
"io/ioutil" | ||
"net/url" | ||
"strings" | ||
) | ||
|
||
type PlaybackIDApiService service | ||
|
||
func (a *PlaybackIDApiService) GetAssetOrLivestreamId(pLAYBACKID string, opts ...APIOption) (GetAssetOrLiveStreamIdResponse, error) { | ||
var ( | ||
localVarAPIOptions = new(APIOptions) | ||
localVarHttpMethod = strings.ToUpper("Get") | ||
localVarPostBody interface{} | ||
localVarFormFileName string | ||
localVarFileName string | ||
localVarFileBytes []byte | ||
localVarReturnValue GetAssetOrLiveStreamIdResponse | ||
) | ||
|
||
for _, opt := range opts { | ||
opt(localVarAPIOptions) | ||
} | ||
|
||
// create path and map variables | ||
localVarPath := a.client.cfg.basePath + "/video/v1/playback-ids/{PLAYBACK_ID}" | ||
localVarPath = strings.Replace(localVarPath, "{"+"PLAYBACK_ID"+"}", fmt.Sprintf("%v", pLAYBACKID), -1) | ||
|
||
localVarHeaderParams := make(map[string]string) | ||
localVarQueryParams := url.Values{} | ||
localVarFormParams := url.Values{} | ||
|
||
// to determine the Content-Type header | ||
localVarHttpContentTypes := []string{} | ||
|
||
// set Content-Type header | ||
localVarHttpContentType := selectHeaderContentType(localVarHttpContentTypes) | ||
if localVarHttpContentType != "" { | ||
localVarHeaderParams["Content-Type"] = localVarHttpContentType | ||
} | ||
|
||
// to determine the Accept header | ||
localVarHttpHeaderAccepts := []string{"application/json"} | ||
|
||
// set Accept header | ||
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) | ||
if localVarHttpHeaderAccept != "" { | ||
localVarHeaderParams["Accept"] = localVarHttpHeaderAccept | ||
} | ||
|
||
r, err := a.client.prepareRequest(localVarAPIOptions, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) | ||
if err != nil { | ||
return localVarReturnValue, err | ||
} | ||
|
||
localVarHttpResponse, err := a.client.callAPI(r) | ||
if err != nil || localVarHttpResponse == nil { | ||
return localVarReturnValue, err | ||
} | ||
|
||
localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body) | ||
localVarHttpResponse.Body.Close() | ||
if err != nil { | ||
return localVarReturnValue, err | ||
} | ||
|
||
// Check for common HTTP error status codes | ||
err = CheckForHttpError(localVarHttpResponse.StatusCode, localVarBody) | ||
if err != nil { | ||
return localVarReturnValue, err | ||
} | ||
|
||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type")) | ||
if err != nil { | ||
newErr := GenericOpenAPIError{ | ||
body: localVarBody, | ||
error: err.Error(), | ||
} | ||
return localVarReturnValue, newErr | ||
} | ||
|
||
return localVarReturnValue, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.