Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
270 changes: 264 additions & 6 deletions bandwidth.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
}
Expand All @@ -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"
}
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -7167,4 +7425,4 @@
}
}
}
}
}
47 changes: 45 additions & 2 deletions bandwidth/api/media_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/MediaApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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


Expand Down
4 changes: 2 additions & 2 deletions docs/MessagesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down