docs/DirectUploadsApi.md in mux_ruby-1.9.0 vs docs/DirectUploadsApi.md in mux_ruby-2.0.0.pre.rc.1

- old
+ new

@@ -1,27 +1,29 @@ # MuxRuby::DirectUploadsApi All URIs are relative to *https://api.mux.com* -Method | HTTP request | Description -------------- | ------------- | ------------- -[**cancel_direct_upload**](DirectUploadsApi.md#cancel_direct_upload) | **PUT** /video/v1/uploads/{UPLOAD_ID}/cancel | Cancel a direct upload -[**create_direct_upload**](DirectUploadsApi.md#create_direct_upload) | **POST** /video/v1/uploads | Create a new direct upload URL -[**get_direct_upload**](DirectUploadsApi.md#get_direct_upload) | **GET** /video/v1/uploads/{UPLOAD_ID} | Retrieve a single direct upload&#39;s info -[**list_direct_uploads**](DirectUploadsApi.md#list_direct_uploads) | **GET** /video/v1/uploads | List direct uploads +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**cancel_direct_upload**](DirectUploadsApi.md#cancel_direct_upload) | **PUT** /video/v1/uploads/{UPLOAD_ID}/cancel | Cancel a direct upload | +| [**create_direct_upload**](DirectUploadsApi.md#create_direct_upload) | **POST** /video/v1/uploads | Create a new direct upload URL | +| [**get_direct_upload**](DirectUploadsApi.md#get_direct_upload) | **GET** /video/v1/uploads/{UPLOAD_ID} | Retrieve a single direct upload&#39;s info | +| [**list_direct_uploads**](DirectUploadsApi.md#list_direct_uploads) | **GET** /video/v1/uploads | List direct uploads | -# **cancel_direct_upload** -> UploadResponse cancel_direct_upload(upload_id) +## cancel_direct_upload +> <UploadResponse> cancel_direct_upload(upload_id) + Cancel a direct upload Cancels a direct upload and marks it as cancelled. If a pending upload finishes after this request, no asset will be created. This request will only succeed if the upload is still in the `waiting` state. -### Example +### Examples + ```ruby -# load the gem +require 'time' require 'mux_ruby' # setup authorization MuxRuby.configure do |config| # Configure HTTP basic authorization: accessToken config.username = 'YOUR USERNAME' @@ -30,23 +32,41 @@ api_instance = MuxRuby::DirectUploadsApi.new upload_id = 'abcd1234' # String | ID of the Upload begin - #Cancel a direct upload + # Cancel a direct upload result = api_instance.cancel_direct_upload(upload_id) p result rescue MuxRuby::ApiError => e - puts "Exception when calling DirectUploadsApi->cancel_direct_upload: #{e}" + puts "Error when calling DirectUploadsApi->cancel_direct_upload: #{e}" end ``` +#### Using the cancel_direct_upload_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> <Array(<UploadResponse>, Integer, Hash)> cancel_direct_upload_with_http_info(upload_id) + +```ruby +begin + # Cancel a direct upload + data, status_code, headers = api_instance.cancel_direct_upload_with_http_info(upload_id) + p status_code # => 2xx + p headers # => { ... } + p data # => <UploadResponse> +rescue MuxRuby::ApiError => e + puts "Error when calling DirectUploadsApi->cancel_direct_upload_with_http_info: #{e}" +end +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **upload_id** | **String**| ID of the Upload | +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **upload_id** | **String** | ID of the Upload | | ### Return type [**UploadResponse**](UploadResponse.md) @@ -54,48 +74,67 @@ [accessToken](../README.md#accessToken) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json +## create_direct_upload -# **create_direct_upload** -> UploadResponse create_direct_upload(create_upload_request) +> <UploadResponse> create_direct_upload(create_upload_request) Create a new direct upload URL -### Example +### Examples + ```ruby -# load the gem +require 'time' require 'mux_ruby' # setup authorization MuxRuby.configure do |config| # Configure HTTP basic authorization: accessToken config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = MuxRuby::DirectUploadsApi.new -create_upload_request = MuxRuby::CreateUploadRequest.new # CreateUploadRequest | +create_upload_request = MuxRuby::CreateUploadRequest.new({new_asset_settings: MuxRuby::CreateAssetRequest.new}) # CreateUploadRequest | begin - #Create a new direct upload URL + # Create a new direct upload URL result = api_instance.create_direct_upload(create_upload_request) p result rescue MuxRuby::ApiError => e - puts "Exception when calling DirectUploadsApi->create_direct_upload: #{e}" + puts "Error when calling DirectUploadsApi->create_direct_upload: #{e}" end ``` +#### Using the create_direct_upload_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> <Array(<UploadResponse>, Integer, Hash)> create_direct_upload_with_http_info(create_upload_request) + +```ruby +begin + # Create a new direct upload URL + data, status_code, headers = api_instance.create_direct_upload_with_http_info(create_upload_request) + p status_code # => 2xx + p headers # => { ... } + p data # => <UploadResponse> +rescue MuxRuby::ApiError => e + puts "Error when calling DirectUploadsApi->create_direct_upload_with_http_info: #{e}" +end +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_upload_request** | [**CreateUploadRequest**](CreateUploadRequest.md)| | +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **create_upload_request** | [**CreateUploadRequest**](CreateUploadRequest.md) | | | ### Return type [**UploadResponse**](UploadResponse.md) @@ -103,23 +142,24 @@ [accessToken](../README.md#accessToken) ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json +## get_direct_upload -# **get_direct_upload** -> UploadResponse get_direct_upload(upload_id) +> <UploadResponse> get_direct_upload(upload_id) Retrieve a single direct upload's info -### Example +### Examples + ```ruby -# load the gem +require 'time' require 'mux_ruby' # setup authorization MuxRuby.configure do |config| # Configure HTTP basic authorization: accessToken config.username = 'YOUR USERNAME' @@ -128,23 +168,41 @@ api_instance = MuxRuby::DirectUploadsApi.new upload_id = 'abcd1234' # String | ID of the Upload begin - #Retrieve a single direct upload's info + # Retrieve a single direct upload's info result = api_instance.get_direct_upload(upload_id) p result rescue MuxRuby::ApiError => e - puts "Exception when calling DirectUploadsApi->get_direct_upload: #{e}" + puts "Error when calling DirectUploadsApi->get_direct_upload: #{e}" end ``` +#### Using the get_direct_upload_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> <Array(<UploadResponse>, Integer, Hash)> get_direct_upload_with_http_info(upload_id) + +```ruby +begin + # Retrieve a single direct upload's info + data, status_code, headers = api_instance.get_direct_upload_with_http_info(upload_id) + p status_code # => 2xx + p headers # => { ... } + p data # => <UploadResponse> +rescue MuxRuby::ApiError => e + puts "Error when calling DirectUploadsApi->get_direct_upload_with_http_info: #{e}" +end +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **upload_id** | **String**| ID of the Upload | +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **upload_id** | **String** | ID of the Upload | | ### Return type [**UploadResponse**](UploadResponse.md) @@ -152,52 +210,71 @@ [accessToken](../README.md#accessToken) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json +## list_direct_uploads -# **list_direct_uploads** -> ListUploadsResponse list_direct_uploads(opts) +> <ListUploadsResponse> list_direct_uploads(opts) List direct uploads -### Example +### Examples + ```ruby -# load the gem +require 'time' require 'mux_ruby' # setup authorization MuxRuby.configure do |config| # Configure HTTP basic authorization: accessToken config.username = 'YOUR USERNAME' config.password = 'YOUR PASSWORD' end api_instance = MuxRuby::DirectUploadsApi.new opts = { - limit: 25, # Integer | Number of items to include in the response - page: 1 # Integer | Offset by this many pages, of the size of `limit` + limit: 56, # Integer | Number of items to include in the response + page: 56 # Integer | Offset by this many pages, of the size of `limit` } begin - #List direct uploads + # List direct uploads result = api_instance.list_direct_uploads(opts) p result rescue MuxRuby::ApiError => e - puts "Exception when calling DirectUploadsApi->list_direct_uploads: #{e}" + puts "Error when calling DirectUploadsApi->list_direct_uploads: #{e}" end ``` +#### Using the list_direct_uploads_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> <Array(<ListUploadsResponse>, Integer, Hash)> list_direct_uploads_with_http_info(opts) + +```ruby +begin + # List direct uploads + data, status_code, headers = api_instance.list_direct_uploads_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => <ListUploadsResponse> +rescue MuxRuby::ApiError => e + puts "Error when calling DirectUploadsApi->list_direct_uploads_with_http_info: #{e}" +end +``` + ### Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **limit** | **Integer**| Number of items to include in the response | [optional] [default to 25] - **page** | **Integer**| Offset by this many pages, of the size of &#x60;limit&#x60; | [optional] [default to 1] +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **limit** | **Integer** | Number of items to include in the response | [optional][default to 25] | +| **page** | **Integer** | Offset by this many pages, of the size of &#x60;limit&#x60; | [optional][default to 1] | ### Return type [**ListUploadsResponse**](ListUploadsResponse.md) @@ -205,10 +282,8 @@ [accessToken](../README.md#accessToken) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: application/json - - +- **Content-Type**: Not defined +- **Accept**: application/json