From 9027b7c6945d0230e99367def50734294085aca4 Mon Sep 17 00:00:00 2001 From: api-librarian Date: Fri, 27 Mar 2020 14:52:19 +0000 Subject: [PATCH 1/4] Travis update: Mar 2020 (Build 593) [skip ci] --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index b863069..9826b73 100644 --- a/setup.py +++ b/setup.py @@ -38,6 +38,5 @@ license="Apache-2.0", long_description="""\ [Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. # noqa: E501 - """, - long_description_content_type="text/markdown" + """ ) From ddf924485c4ecac14790dc2ec46abb60f33ca1e3 Mon Sep 17 00:00:00 2001 From: api-librarian Date: Fri, 8 May 2020 06:50:14 +0000 Subject: [PATCH 2/4] Travis update: May 2020 (Build 605) [skip ci] --- .openapi-generator/VERSION | 2 +- docs/BlacklistApi.md | 84 ++++++++++++----- docs/ContactsApi.md | 168 +++++++++++++++++++++++---------- docs/DeliveryReportApi.md | 21 +++-- docs/GroupsApi.md | 105 +++++++++++++++------ docs/NumberLookupApi.md | 21 +++-- docs/OmnimessageApi.md | 42 ++++++--- docs/StatisticsApi.md | 21 +++-- docs/SyncNumberLookupResult.md | 2 +- messente_api/api_client.py | 51 ++++++---- messente_api/configuration.py | 13 ++- messente_api/rest.py | 5 - 12 files changed, 376 insertions(+), 159 deletions(-) diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 8191138..ecedc98 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -4.3.0 \ No newline at end of file +4.3.1 \ No newline at end of file diff --git a/docs/BlacklistApi.md b/docs/BlacklistApi.md index 9f544a9..5a1fb72 100644 --- a/docs/BlacklistApi.md +++ b/docs/BlacklistApi.md @@ -24,13 +24,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -89,13 +98,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -154,13 +172,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -214,13 +241,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: diff --git a/docs/ContactsApi.md b/docs/ContactsApi.md index beda8c3..a7a4f8b 100644 --- a/docs/ContactsApi.md +++ b/docs/ContactsApi.md @@ -28,13 +28,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -97,13 +106,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -163,13 +181,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -228,13 +255,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -293,13 +329,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -358,13 +403,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -423,13 +477,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -490,13 +553,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: diff --git a/docs/DeliveryReportApi.md b/docs/DeliveryReportApi.md index 65ccb11..082461b 100644 --- a/docs/DeliveryReportApi.md +++ b/docs/DeliveryReportApi.md @@ -21,13 +21,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: diff --git a/docs/GroupsApi.md b/docs/GroupsApi.md index ef69fe2..6f89f89 100644 --- a/docs/GroupsApi.md +++ b/docs/GroupsApi.md @@ -25,13 +25,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -90,13 +99,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -154,13 +172,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -218,13 +245,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -278,13 +314,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: diff --git a/docs/NumberLookupApi.md b/docs/NumberLookupApi.md index ae2435c..1342839 100644 --- a/docs/NumberLookupApi.md +++ b/docs/NumberLookupApi.md @@ -21,13 +21,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: diff --git a/docs/OmnimessageApi.md b/docs/OmnimessageApi.md index f0de845..06628b7 100644 --- a/docs/OmnimessageApi.md +++ b/docs/OmnimessageApi.md @@ -22,13 +22,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: @@ -84,13 +93,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: diff --git a/docs/StatisticsApi.md b/docs/StatisticsApi.md index 7444dfa..14a44c5 100644 --- a/docs/StatisticsApi.md +++ b/docs/StatisticsApi.md @@ -21,13 +21,22 @@ import time import messente_api from messente_api.rest import ApiException from pprint import pprint -configuration = messente_api.Configuration() -# Configure HTTP basic authorization: basicAuth -configuration.username = 'YOUR_USERNAME' -configuration.password = 'YOUR_PASSWORD' +# Defining the host is optional and defaults to https://api.messente.com/v1 +# See configuration.py for a list of all supported configuration parameters. +configuration = messente_api.Configuration( + host = "https://api.messente.com/v1" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. -# Defining host is optional and default to https://api.messente.com/v1 -configuration.host = "https://api.messente.com/v1" +# Configure HTTP basic authorization: basicAuth +configuration = messente_api.Configuration( + username = 'YOUR_USERNAME', + password = 'YOUR_PASSWORD' +) # Enter a context with an instance of the API client with messente_api.ApiClient(configuration) as api_client: diff --git a/docs/SyncNumberLookupResult.md b/docs/SyncNumberLookupResult.md index bc82167..73fdca9 100644 --- a/docs/SyncNumberLookupResult.md +++ b/docs/SyncNumberLookupResult.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **original_network** | [**MobileNetwork**](MobileNetwork.md) | | [optional] **ported_network** | [**MobileNetwork**](MobileNetwork.md) | | [optional] **status** | **str** | Status of the phone number | [optional] -**error** | **object** | Indicates if any error occurred while handling the request | [optional] +**error** | [**object**](.md) | Indicates if any error occurred while handling the request | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/messente_api/api_client.py b/messente_api/api_client.py index b1a1983..1339d03 100644 --- a/messente_api/api_client.py +++ b/messente_api/api_client.py @@ -28,7 +28,7 @@ from messente_api.configuration import Configuration import messente_api.models from messente_api import rest -from messente_api.exceptions import ApiValueError +from messente_api.exceptions import ApiValueError, ApiException class ApiClient(object): @@ -177,22 +177,38 @@ def __call_api( # use server/host defined in path or operation instead url = _host + resource_path - # perform request and return response - response_data = self.request( - method, url, query_params=query_params, headers=header_params, - post_params=post_params, body=body, - _preload_content=_preload_content, - _request_timeout=_request_timeout) + try: + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + except ApiException as e: + e.body = e.body.decode('utf-8') if six.PY3 else e.body + raise e + + content_type = response_data.getheader('content-type') self.last_response = response_data return_data = response_data - if _preload_content: - # deserialize response data - if response_type: - return_data = self.deserialize(response_data, response_type) - else: - return_data = None + + if not _preload_content: + return return_data + + if six.PY3 and response_type not in ["file", "bytes"]: + match = None + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None if _return_http_data_only: return (return_data) @@ -625,9 +641,12 @@ def __deserialize_model(self, data, klass): :param klass: class literal. :return: model object. """ + has_discriminator = False + if (hasattr(klass, 'get_real_child_model') + and klass.discriminator_value_class_map): + has_discriminator = True - if not klass.openapi_types and not hasattr(klass, - 'get_real_child_model'): + if not klass.openapi_types and has_discriminator is False: return data kwargs = {} @@ -641,7 +660,7 @@ def __deserialize_model(self, data, klass): instance = klass(**kwargs) - if hasattr(instance, 'get_real_child_model'): + if has_discriminator: klass_name = instance.get_real_child_model(data) if klass_name: instance = self.__deserialize(data, klass_name) diff --git a/messente_api/configuration.py b/messente_api/configuration.py index 8fd81dd..1b0aa9f 100644 --- a/messente_api/configuration.py +++ b/messente_api/configuration.py @@ -62,10 +62,12 @@ class Configuration(object): scheme: basic Configure API client with HTTP basic authentication: - conf = messente_api.Configuration( - username='the-user', - password='the-password', - ) + +conf = messente_api.Configuration( + username='the-user', + password='the-password', +) + """ _default = None @@ -180,6 +182,9 @@ def __deepcopy__(self, memo): result.debug = self.debug return result + def __setattr__(self, name, value): + object.__setattr__(self, name, value) + @classmethod def set_default(cls, default): """Set default instance of configuration. diff --git a/messente_api/rest.py b/messente_api/rest.py index 56c5657..b93e90d 100644 --- a/messente_api/rest.py +++ b/messente_api/rest.py @@ -218,11 +218,6 @@ def request(self, method, url, query_params=None, headers=None, if _preload_content: r = RESTResponse(r) - # In the python 3, the response.data is bytes. - # we need to decode it to string. - if six.PY3: - r.data = r.data.decode('utf8') - # log response body logger.debug("response body: %s", r.data) From b925ffed42875ea679c6bd2161141f2beba90197 Mon Sep 17 00:00:00 2001 From: api-librarian Date: Fri, 8 May 2020 07:03:19 +0000 Subject: [PATCH 3/4] Travis update: May 2020 (Build 606) [skip ci] --- README.md | 2 +- messente_api/__init__.py | 2 +- messente_api/api_client.py | 2 +- messente_api/configuration.py | 2 +- setup.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ac49074..49f71db 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Messente API Library - Messente API version: 1.2.0 -- Python package version: 1.2.1 +- Python package version: 1.2.2 [Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. diff --git a/messente_api/__init__.py b/messente_api/__init__.py index a933fd9..f86d0df 100644 --- a/messente_api/__init__.py +++ b/messente_api/__init__.py @@ -15,7 +15,7 @@ from __future__ import absolute_import -__version__ = "1.2.1" +__version__ = "1.2.2" # import apis into sdk package from messente_api.api.blacklist_api import BlacklistApi diff --git a/messente_api/api_client.py b/messente_api/api_client.py index 1339d03..fcabb37 100644 --- a/messente_api/api_client.py +++ b/messente_api/api_client.py @@ -79,7 +79,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.2.1/python' + self.user_agent = 'OpenAPI-Generator/1.2.2/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/messente_api/configuration.py b/messente_api/configuration.py index 1b0aa9f..c9bcbe5 100644 --- a/messente_api/configuration.py +++ b/messente_api/configuration.py @@ -350,7 +350,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.2.0\n"\ - "SDK Package Version: 1.2.1".\ + "SDK Package Version: 1.2.2".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/setup.py b/setup.py index 9826b73..3340f5d 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "messente-api" -VERSION = "1.2.1" +VERSION = "1.2.2" # To install the library, run the following # # python setup.py install From 5a75f191772f89399c08e731fa80c5cbe11a77ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20R=C3=A4ni?= Date: Fri, 8 May 2020 10:29:28 +0300 Subject: [PATCH 4/4] Set long description type --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3340f5d..22bcb7c 100644 --- a/setup.py +++ b/setup.py @@ -38,5 +38,6 @@ license="Apache-2.0", long_description="""\ [Messente](https://messente.com) is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world. # noqa: E501 - """ + """, + long_description_content_type="text/markdown" )