From 058c28202cd79bcd534f5f9302d77ce7a3e7dc94 Mon Sep 17 00:00:00 2001 From: AJ Rice <53190766+ajrice6713@users.noreply.github.com> Date: Thu, 8 Sep 2022 13:14:26 -0400 Subject: [PATCH] DX-2826 Regenerate with updated `bandwidth.json` file --- bandwidth.json | 270 ++++++++++++++++++++++++++++++++++++- bandwidth/api/media_api.py | 47 ++++++- docs/MediaApi.md | 4 +- docs/MessagesApi.md | 4 +- 4 files changed, 313 insertions(+), 12 deletions(-) diff --git a/bandwidth.json b/bandwidth.json index 60f04fe6..e6b0f746 100644 --- a/bandwidth.json +++ b/bandwidth.json @@ -143,7 +143,7 @@ }, "put": { "summary": "Upload Media", - "description": "Upload a file. You may add headers to the request in order to provide some control to your media file.", + "description": "Upload a file. You may add headers to the request in order to provide some control to your media file.\n\nA list of supported media types can be found [here](https://support.bandwidth.com/hc/en-us/articles/360014128994-What-MMS-file-types-are-supported-).", "operationId": "uploadMedia", "tags": [ "Media" @@ -2653,7 +2653,7 @@ "time": { "type": "string", "description": "The datetime stamp of the message in ISO 8601", - "example": "2016-09-14T18:20:16.000Z" + "example": "2022-09-14T18:20:16.000Z" }, "segmentCount": { "type": "integer", @@ -6475,7 +6475,7 @@ "name": "fromDateTime", "required": false, "description": "The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days.", - "example": "2016-09-14T18:20:16.000Z", + "example": "2022-09-14T18:20:16.000Z", "schema": { "type": "string" } @@ -6485,7 +6485,7 @@ "name": "toDateTime", "required": false, "description": "The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days.", - "example": "2016-09-14T18:20:16.000Z", + "example": "2022-09-14T18:20:16.000Z", "schema": { "type": "string" } @@ -6738,7 +6738,265 @@ }, "uploadMediaRequest": { "content": { - "application/octet-stream": { + "application/json": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/ogg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/pdf": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/rtf": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/zip": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/x-tar": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/xml": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/gzip": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/x-bzip2": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/x-gzip": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/smil": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "application/javascript": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/mp4": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/ogg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/flac": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/webm": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/wav": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/amr": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "audio/3gpp": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/bmp": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/gif": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/jpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/pjpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/png": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/svg+xml": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/tiff": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/webp": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "image/x-icon": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/css": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/csv": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/calendar": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/plain": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/javascript": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/vcard": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/vnd.wap.wml": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "text/xml": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "video/avi": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "video/mp4": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "video/mpeg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "video/ogg": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "video/quicktime": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "video/webm": { + "schema": { + "type": "string", + "format": "binary" + } + }, + "video/x-ms-wmv": { "schema": { "type": "string", "format": "binary" @@ -7167,4 +7425,4 @@ } } } -} +} \ No newline at end of file diff --git a/bandwidth/api/media_api.py b/bandwidth/api/media_api.py index 75eb94d4..85ba61ac 100644 --- a/bandwidth/api/media_api.py +++ b/bandwidth/api/media_api.py @@ -297,7 +297,50 @@ def __init__(self, api_client=None): 'application/json' ], 'content_type': [ - 'application/octet-stream' + 'application/json', + 'application/ogg', + 'application/pdf', + 'application/rtf', + 'application/zip', + 'application/x-tar', + 'application/xml', + 'application/gzip', + 'application/x-bzip2', + 'application/x-gzip', + 'application/smil', + 'application/javascript', + 'audio/mp4', + 'audio/mpeg', + 'audio/ogg', + 'audio/flac', + 'audio/webm', + 'audio/wav', + 'audio/amr', + 'audio/3gpp', + 'image/bmp', + 'image/gif', + 'image/jpeg', + 'image/pjpeg', + 'image/png', + 'image/svg+xml', + 'image/tiff', + 'image/webp', + 'image/x-icon', + 'text/css', + 'text/csv', + 'text/calendar', + 'text/plain', + 'text/javascript', + 'text/vcard', + 'text/vnd.wap.wml', + 'text/xml', + 'video/avi', + 'video/mp4', + 'video/mpeg', + 'video/ogg', + 'video/quicktime', + 'video/webm', + 'video/x-ms-wmv' ] }, api_client=api_client @@ -570,7 +613,7 @@ def upload_media( ): """Upload Media # noqa: E501 - Upload a file. You may add headers to the request in order to provide some control to your media file. # noqa: E501 + Upload a file. You may add headers to the request in order to provide some control to your media file. A list of supported media types can be found [here](https://support.bandwidth.com/hc/en-us/articles/360014128994-What-MMS-file-types-are-supported-). # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True diff --git a/docs/MediaApi.md b/docs/MediaApi.md index 8930dd20..91ea588f 100644 --- a/docs/MediaApi.md +++ b/docs/MediaApi.md @@ -285,7 +285,7 @@ Name | Type | Description | Notes Upload Media -Upload a file. You may add headers to the request in order to provide some control to your media file. +Upload a file. You may add headers to the request in order to provide some control to your media file. A list of supported media types can be found [here](https://support.bandwidth.com/hc/en-us/articles/360014128994-What-MMS-file-types-are-supported-). ### Example @@ -361,7 +361,7 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: application/octet-stream + - **Content-Type**: application/json, application/ogg, application/pdf, application/rtf, application/zip, application/x-tar, application/xml, application/gzip, application/x-bzip2, application/x-gzip, application/smil, application/javascript, audio/mp4, audio/mpeg, audio/ogg, audio/flac, audio/webm, audio/wav, audio/amr, audio/3gpp, image/bmp, image/gif, image/jpeg, image/pjpeg, image/png, image/svg+xml, image/tiff, image/webp, image/x-icon, text/css, text/csv, text/calendar, text/plain, text/javascript, text/vcard, text/vnd.wap.wml, text/xml, video/avi, video/mp4, video/mpeg, video/ogg, video/quicktime, video/webm, video/x-ms-wmv - **Accept**: application/json diff --git a/docs/MessagesApi.md b/docs/MessagesApi.md index ab4a82c5..c481c338 100644 --- a/docs/MessagesApi.md +++ b/docs/MessagesApi.md @@ -158,8 +158,8 @@ with bandwidth.ApiClient(configuration) as api_client: carrier_name = "Verizon" # str | The name of the carrier used for this message. Possible values include but are not limited to Verizon and TMobile. Special characters need to be encoded using URL encoding (i.e. AT&T should be passed as AT%26T). (optional) message_type = MessageTypeEnum("sms") # MessageTypeEnum | The type of message. Either sms or mms. (optional) error_code = 9902 # int | The error code of the message. (optional) - from_date_time = "2016-09-14T18:20:16.000Z" # str | The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) - to_date_time = "2016-09-14T18:20:16.000Z" # str | The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + from_date_time = "2022-09-14T18:20:16.000Z" # str | The start of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) + to_date_time = "2022-09-14T18:20:16.000Z" # str | The end of the date range to search in ISO 8601 format. Uses the message receive time. The date range to search in is currently 14 days. (optional) sort = "sourceTn:desc" # str | The field and direction to sort by combined with a colon. Direction is either asc or desc. (optional) page_token = "gdEewhcJLQRB5" # str | A base64 encoded value used for pagination of results. (optional) limit = 50 # int | The maximum records requested in search result. Default 100. The sum of limit and after cannot be more than 10000. (optional)