Skip to content

Commit a88f6de

Browse files
Merge pull request #8 from sendinblue/feature_updated_swagger_sync
swagger sync: delete route added for templates
2 parents 4e97c26 + d87448f commit a88f6de

14 files changed

+267
-39
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,19 @@ Class | Method | HTTP request | Description
143143
*ResellerApi* | [**get_reseller_childs**](docs/ResellerApi.md#get_reseller_childs) | **GET** /reseller/children | Gets the list of all reseller's children accounts
144144
*ResellerApi* | [**remove_credits**](docs/ResellerApi.md#remove_credits) | **POST** /reseller/children/{childId}/credits/remove | Remove Email and/or SMS credits from a specific child account
145145
*ResellerApi* | [**update_reseller_child**](docs/ResellerApi.md#update_reseller_child) | **PUT** /reseller/children/{childId} | Updates infos of reseller's child based on the childId supplied
146-
*SMSCampaignsApi* | [**create_sms_campaign**](docs/SMSCampaignsApi.md#create_sms_campaign) | **POST** /smsCampaigns | Creates a SMS campaign
146+
*SMSCampaignsApi* | [**create_sms_campaign**](docs/SMSCampaignsApi.md#create_sms_campaign) | **POST** /smsCampaigns | Creates an SMS campaign
147147
*SMSCampaignsApi* | [**delete_sms_campaigns**](docs/SMSCampaignsApi.md#delete_sms_campaigns) | **DELETE** /smsCampaigns/{campaignId} | Delete the SMS campaign
148-
*SMSCampaignsApi* | [**get_sms_campaign**](docs/SMSCampaignsApi.md#get_sms_campaign) | **GET** /smsCampaigns/{campaignId} | Get a SMS campaign
148+
*SMSCampaignsApi* | [**get_sms_campaign**](docs/SMSCampaignsApi.md#get_sms_campaign) | **GET** /smsCampaigns/{campaignId} | Get an SMS campaign
149149
*SMSCampaignsApi* | [**get_sms_campaigns**](docs/SMSCampaignsApi.md#get_sms_campaigns) | **GET** /smsCampaigns | Returns the informations for all your created SMS campaigns
150150
*SMSCampaignsApi* | [**request_sms_recipient_export**](docs/SMSCampaignsApi.md#request_sms_recipient_export) | **POST** /smsCampaigns/{campaignId}/exportRecipients | Exports the recipients of the specified campaign.
151151
*SMSCampaignsApi* | [**send_sms_campaign_now**](docs/SMSCampaignsApi.md#send_sms_campaign_now) | **POST** /smsCampaigns/{campaignId}/sendNow | Send your SMS campaign immediately
152152
*SMSCampaignsApi* | [**send_sms_report**](docs/SMSCampaignsApi.md#send_sms_report) | **POST** /smsCampaigns/{campaignId}/sendReport | Send report of SMS campaigns
153153
*SMSCampaignsApi* | [**send_test_sms**](docs/SMSCampaignsApi.md#send_test_sms) | **POST** /smsCampaigns/{campaignId}/sendTest | Send an SMS
154-
*SMSCampaignsApi* | [**update_sms_campaign**](docs/SMSCampaignsApi.md#update_sms_campaign) | **PUT** /smsCampaigns/{campaignId} | Updates a SMS campaign
154+
*SMSCampaignsApi* | [**update_sms_campaign**](docs/SMSCampaignsApi.md#update_sms_campaign) | **PUT** /smsCampaigns/{campaignId} | Updates an SMS campaign
155155
*SMSCampaignsApi* | [**update_sms_campaign_status**](docs/SMSCampaignsApi.md#update_sms_campaign_status) | **PUT** /smsCampaigns/{campaignId}/status | Update the campaign status
156156
*SMTPApi* | [**create_smtp_template**](docs/SMTPApi.md#create_smtp_template) | **POST** /smtp/templates | Create an smtp template
157157
*SMTPApi* | [**delete_hardbounces**](docs/SMTPApi.md#delete_hardbounces) | **POST** /smtp/deleteHardbounces | Delete hardbounces
158+
*SMTPApi* | [**delete_smtp_template**](docs/SMTPApi.md#delete_smtp_template) | **DELETE** /smtp/templates/{templateId} | Delete an inactive smtp template
158159
*SMTPApi* | [**get_aggregated_smtp_report**](docs/SMTPApi.md#get_aggregated_smtp_report) | **GET** /smtp/statistics/aggregatedReport | Get your SMTP activity aggregated over a period of time
159160
*SMTPApi* | [**get_email_event_report**](docs/SMTPApi.md#get_email_event_report) | **GET** /smtp/statistics/events | Get all your SMTP activity (unaggregated events)
160161
*SMTPApi* | [**get_smtp_report**](docs/SMTPApi.md#get_smtp_report) | **GET** /smtp/statistics/reports | Get your SMTP activity aggregated per day

docs/ContactsApi.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ Name | Type | Description | Notes
587587
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
588588

589589
# **get_contacts**
590-
> GetContacts get_contacts(limit=limit, offset=offset)
590+
> GetContacts get_contacts(limit=limit, offset=offset, modified_since=modified_since)
591591
592592
Get all the contacts
593593

@@ -608,10 +608,11 @@ sib_api_v3_sdk.configuration.api_key['api-key'] = 'YOUR_API_KEY'
608608
api_instance = sib_api_v3_sdk.ContactsApi()
609609
limit = 50 # int | Number of documents per page (optional) (default to 50)
610610
offset = 0 # int | Index of the first document of the page (optional) (default to 0)
611+
modified_since = '2013-10-20T19:20:30+01:00' # datetime | Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) (optional)
611612

612613
try:
613614
# Get all the contacts
614-
api_response = api_instance.get_contacts(limit=limit, offset=offset)
615+
api_response = api_instance.get_contacts(limit=limit, offset=offset, modified_since=modified_since)
615616
pprint(api_response)
616617
except ApiException as e:
617618
print("Exception when calling ContactsApi->get_contacts: %s\n" % e)
@@ -623,6 +624,7 @@ Name | Type | Description | Notes
623624
------------- | ------------- | ------------- | -------------
624625
**limit** | **int**| Number of documents per page | [optional] [default to 50]
625626
**offset** | **int**| Index of the first document of the page | [optional] [default to 0]
627+
**modified_since** | **datetime**| Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ) | [optional]
626628

627629
### Return type
628630

docs/CreateContact.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
88
**email_blacklisted** | **bool** | Blacklist the contact for emails (emailBlacklisted = true) | [optional]
99
**sms_blacklisted** | **bool** | Blacklist the contact for SMS (smsBlacklisted = true) | [optional]
1010
**list_ids** | **list[int]** | Ids of the lists to add the contact to | [optional]
11+
**update_enabled** | **bool** | Facilitate to update existing contact in same request (updateEnabled = true) | [optional] [default to False]
1112

1213
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1314

docs/GetEmailEventReportEvents.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**email** | **str** | Email address which generates the event |
7-
**date** | **date** | Date on which the event has been generated |
7+
**date** | **datetime** | Date on which the event has been generated |
88
**subject** | **str** | Subject of the event | [optional]
99
**message_id** | **str** | Message ID which generated the event |
1010
**event** | **str** | Event which occurred |
11-
**reason** | **str** | Reason of bounce (only available if the event is hardbounce or softbounce) |
11+
**reason** | **str** | Reason of bounce (only available if the event is hardbounce or softbounce) | [optional]
1212
**tag** | **str** | Tag of the email which generated the event |
1313
**ip** | **str** | IP from which the user has opened the email or clicked on the link (only available if the event is opened or clicks) | [optional]
1414
**link** | **str** | The link which is sent to the user (only available if the event is requests or opened or clicks) | [optional]
15+
**_from** | **str** | Sender email from which the emails are sent |
1516

1617
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1718

docs/SMSCampaignsApi.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ All URIs are relative to *https://api.sendinblue.com/v3*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**create_sms_campaign**](SMSCampaignsApi.md#create_sms_campaign) | **POST** /smsCampaigns | Creates a SMS campaign
7+
[**create_sms_campaign**](SMSCampaignsApi.md#create_sms_campaign) | **POST** /smsCampaigns | Creates an SMS campaign
88
[**delete_sms_campaigns**](SMSCampaignsApi.md#delete_sms_campaigns) | **DELETE** /smsCampaigns/{campaignId} | Delete the SMS campaign
9-
[**get_sms_campaign**](SMSCampaignsApi.md#get_sms_campaign) | **GET** /smsCampaigns/{campaignId} | Get a SMS campaign
9+
[**get_sms_campaign**](SMSCampaignsApi.md#get_sms_campaign) | **GET** /smsCampaigns/{campaignId} | Get an SMS campaign
1010
[**get_sms_campaigns**](SMSCampaignsApi.md#get_sms_campaigns) | **GET** /smsCampaigns | Returns the informations for all your created SMS campaigns
1111
[**request_sms_recipient_export**](SMSCampaignsApi.md#request_sms_recipient_export) | **POST** /smsCampaigns/{campaignId}/exportRecipients | Exports the recipients of the specified campaign.
1212
[**send_sms_campaign_now**](SMSCampaignsApi.md#send_sms_campaign_now) | **POST** /smsCampaigns/{campaignId}/sendNow | Send your SMS campaign immediately
1313
[**send_sms_report**](SMSCampaignsApi.md#send_sms_report) | **POST** /smsCampaigns/{campaignId}/sendReport | Send report of SMS campaigns
1414
[**send_test_sms**](SMSCampaignsApi.md#send_test_sms) | **POST** /smsCampaigns/{campaignId}/sendTest | Send an SMS
15-
[**update_sms_campaign**](SMSCampaignsApi.md#update_sms_campaign) | **PUT** /smsCampaigns/{campaignId} | Updates a SMS campaign
15+
[**update_sms_campaign**](SMSCampaignsApi.md#update_sms_campaign) | **PUT** /smsCampaigns/{campaignId} | Updates an SMS campaign
1616
[**update_sms_campaign_status**](SMSCampaignsApi.md#update_sms_campaign_status) | **PUT** /smsCampaigns/{campaignId}/status | Update the campaign status
1717

1818

1919
# **create_sms_campaign**
2020
> CreateModel create_sms_campaign(create_sms_campaign)
2121
22-
Creates a SMS campaign
22+
Creates an SMS campaign
2323

2424
### Example
2525
```python
@@ -39,7 +39,7 @@ api_instance = sib_api_v3_sdk.SMSCampaignsApi()
3939
create_sms_campaign = sib_api_v3_sdk.CreateSmsCampaign() # CreateSmsCampaign | Values to create an SMS Campaign
4040

4141
try:
42-
# Creates a SMS campaign
42+
# Creates an SMS campaign
4343
api_response = api_instance.create_sms_campaign(create_sms_campaign)
4444
pprint(api_response)
4545
except ApiException as e:
@@ -120,7 +120,7 @@ void (empty response body)
120120
# **get_sms_campaign**
121121
> GetSmsCampaign get_sms_campaign(campaign_id, get_sms_campaign)
122122
123-
Get a SMS campaign
123+
Get an SMS campaign
124124

125125
### Example
126126
```python
@@ -141,7 +141,7 @@ campaign_id = 789 # int | id of the SMS campaign
141141
get_sms_campaign = sib_api_v3_sdk.GetSmsCampaign() # GetSmsCampaign | Values to update an SMS Campaign
142142

143143
try:
144-
# Get a SMS campaign
144+
# Get an SMS campaign
145145
api_response = api_instance.get_sms_campaign(campaign_id, get_sms_campaign)
146146
pprint(api_response)
147147
except ApiException as e:
@@ -439,7 +439,7 @@ void (empty response body)
439439
# **update_sms_campaign**
440440
> update_sms_campaign(campaign_id, update_sms_campaign)
441441
442-
Updates a SMS campaign
442+
Updates an SMS campaign
443443

444444
### Example
445445
```python
@@ -460,7 +460,7 @@ campaign_id = 789 # int | id of the SMS campaign
460460
update_sms_campaign = sib_api_v3_sdk.UpdateSmsCampaign() # UpdateSmsCampaign | Values to update an SMS Campaign
461461

462462
try:
463-
# Updates a SMS campaign
463+
# Updates an SMS campaign
464464
api_instance.update_sms_campaign(campaign_id, update_sms_campaign)
465465
except ApiException as e:
466466
print("Exception when calling SMSCampaignsApi->update_sms_campaign: %s\n" % e)

docs/SMTPApi.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**create_smtp_template**](SMTPApi.md#create_smtp_template) | **POST** /smtp/templates | Create an smtp template
88
[**delete_hardbounces**](SMTPApi.md#delete_hardbounces) | **POST** /smtp/deleteHardbounces | Delete hardbounces
9+
[**delete_smtp_template**](SMTPApi.md#delete_smtp_template) | **DELETE** /smtp/templates/{templateId} | Delete an inactive smtp template
910
[**get_aggregated_smtp_report**](SMTPApi.md#get_aggregated_smtp_report) | **GET** /smtp/statistics/aggregatedReport | Get your SMTP activity aggregated over a period of time
1011
[**get_email_event_report**](SMTPApi.md#get_email_event_report) | **GET** /smtp/statistics/events | Get all your SMTP activity (unaggregated events)
1112
[**get_smtp_report**](SMTPApi.md#get_smtp_report) | **GET** /smtp/statistics/reports | Get your SMTP activity aggregated per day
@@ -120,6 +121,56 @@ void (empty response body)
120121

121122
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
122123

124+
# **delete_smtp_template**
125+
> delete_smtp_template(template_id)
126+
127+
Delete an inactive smtp template
128+
129+
### Example
130+
```python
131+
from __future__ import print_function
132+
import time
133+
import sib_api_v3_sdk
134+
from sib_api_v3_sdk.rest import ApiException
135+
from pprint import pprint
136+
137+
# Configure API key authorization: api-key
138+
sib_api_v3_sdk.configuration.api_key['api-key'] = 'YOUR_API_KEY'
139+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
140+
# sib_api_v3_sdk.configuration.api_key_prefix['api-key'] = 'Bearer'
141+
142+
# create an instance of the API class
143+
api_instance = sib_api_v3_sdk.SMTPApi()
144+
template_id = 789 # int | id of the template
145+
146+
try:
147+
# Delete an inactive smtp template
148+
api_instance.delete_smtp_template(template_id)
149+
except ApiException as e:
150+
print("Exception when calling SMTPApi->delete_smtp_template: %s\n" % e)
151+
```
152+
153+
### Parameters
154+
155+
Name | Type | Description | Notes
156+
------------- | ------------- | ------------- | -------------
157+
**template_id** | **int**| id of the template |
158+
159+
### Return type
160+
161+
void (empty response body)
162+
163+
### Authorization
164+
165+
[api-key](../README.md#api-key)
166+
167+
### HTTP request headers
168+
169+
- **Content-Type**: application/json
170+
- **Accept**: application/json
171+
172+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
173+
123174
# **get_aggregated_smtp_report**
124175
> GetAggregatedReport get_aggregated_smtp_report(start_date=start_date, end_date=end_date, days=days, tag=tag)
125176

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from setuptools import setup, find_packages
1616

1717
NAME = "sib-api-v3-sdk"
18-
VERSION = "1.1.1"
18+
VERSION = "1.1.2"
1919
# To install the library, run the following
2020
#
2121
# python setup.py install

sib_api_v3_sdk/apis/contacts_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,6 +1198,7 @@ def get_contacts(self, **kwargs):
11981198
for asynchronous request. (optional)
11991199
:param int limit: Number of documents per page
12001200
:param int offset: Index of the first document of the page
1201+
:param datetime modified_since: Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ)
12011202
:return: GetContacts
12021203
If the method is called asynchronously,
12031204
returns the request thread.
@@ -1224,12 +1225,13 @@ def get_contacts_with_http_info(self, **kwargs):
12241225
for asynchronous request. (optional)
12251226
:param int limit: Number of documents per page
12261227
:param int offset: Index of the first document of the page
1228+
:param datetime modified_since: Filter (urlencoded) the contacts modified after a given date-time (YYYY-MM-DDTHH:mm:ss.SSSZ)
12271229
:return: GetContacts
12281230
If the method is called asynchronously,
12291231
returns the request thread.
12301232
"""
12311233

1232-
all_params = ['limit', 'offset']
1234+
all_params = ['limit', 'offset', 'modified_since']
12331235
all_params.append('callback')
12341236
all_params.append('_return_http_data_only')
12351237
all_params.append('_preload_content')
@@ -1257,6 +1259,8 @@ def get_contacts_with_http_info(self, **kwargs):
12571259
query_params.append(('limit', params['limit']))
12581260
if 'offset' in params:
12591261
query_params.append(('offset', params['offset']))
1262+
if 'modified_since' in params:
1263+
query_params.append(('modifiedSince', params['modified_since']))
12601264

12611265
header_params = {}
12621266

sib_api_v3_sdk/apis/sms_campaigns_api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(self, api_client=None):
4242

4343
def create_sms_campaign(self, create_sms_campaign, **kwargs):
4444
"""
45-
Creates a SMS campaign
45+
Creates an SMS campaign
4646
This method makes a synchronous HTTP request by default. To make an
4747
asynchronous HTTP request, please define a `callback` function
4848
to be invoked when receiving the response.
@@ -67,7 +67,7 @@ def create_sms_campaign(self, create_sms_campaign, **kwargs):
6767

6868
def create_sms_campaign_with_http_info(self, create_sms_campaign, **kwargs):
6969
"""
70-
Creates a SMS campaign
70+
Creates an SMS campaign
7171
This method makes a synchronous HTTP request by default. To make an
7272
asynchronous HTTP request, please define a `callback` function
7373
to be invoked when receiving the response.
@@ -250,7 +250,7 @@ def delete_sms_campaigns_with_http_info(self, campaign_id, **kwargs):
250250

251251
def get_sms_campaign(self, campaign_id, get_sms_campaign, **kwargs):
252252
"""
253-
Get a SMS campaign
253+
Get an SMS campaign
254254
This method makes a synchronous HTTP request by default. To make an
255255
asynchronous HTTP request, please define a `callback` function
256256
to be invoked when receiving the response.
@@ -276,7 +276,7 @@ def get_sms_campaign(self, campaign_id, get_sms_campaign, **kwargs):
276276

277277
def get_sms_campaign_with_http_info(self, campaign_id, get_sms_campaign, **kwargs):
278278
"""
279-
Get a SMS campaign
279+
Get an SMS campaign
280280
This method makes a synchronous HTTP request by default. To make an
281281
asynchronous HTTP request, please define a `callback` function
282282
to be invoked when receiving the response.
@@ -910,7 +910,7 @@ def send_test_sms_with_http_info(self, campaign_id, send_test_sms, **kwargs):
910910

911911
def update_sms_campaign(self, campaign_id, update_sms_campaign, **kwargs):
912912
"""
913-
Updates a SMS campaign
913+
Updates an SMS campaign
914914
This method makes a synchronous HTTP request by default. To make an
915915
asynchronous HTTP request, please define a `callback` function
916916
to be invoked when receiving the response.
@@ -936,7 +936,7 @@ def update_sms_campaign(self, campaign_id, update_sms_campaign, **kwargs):
936936

937937
def update_sms_campaign_with_http_info(self, campaign_id, update_sms_campaign, **kwargs):
938938
"""
939-
Updates a SMS campaign
939+
Updates an SMS campaign
940940
This method makes a synchronous HTTP request by default. To make an
941941
asynchronous HTTP request, please define a `callback` function
942942
to be invoked when receiving the response.

0 commit comments

Comments
 (0)