Skip to content

Commit 4b5b8e3

Browse files
Merge pull request #1 from sendinblue/feature_v3_python_library
Initial release for python library
2 parents 7c5a095 + d672d6a commit 4b5b8e3

File tree

501 files changed

+60092
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

501 files changed

+60092
-2
lines changed

.gitignore

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
venv/
48+
.python-version
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
57+
# Sphinx documentation
58+
docs/_build/
59+
60+
# PyBuilder
61+
target/
62+
63+
#Ipython Notebook
64+
.ipynb_checkpoints

.swagger-codegen-ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Swagger Codegen Ignore
2+
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

.swagger-codegen/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.2.3

.travis.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ref: https://docs.travis-ci.com/user/languages/python
2+
language: python
3+
python:
4+
- "2.7"
5+
- "3.2"
6+
- "3.3"
7+
- "3.4"
8+
- "3.5"
9+
#- "3.5-dev" # 3.5 development branch
10+
#- "nightly" # points to the latest development branch e.g. 3.6-dev
11+
# command to install dependencies
12+
install: "pip install -r requirements.txt"
13+
# command to run tests
14+
script: nosetests

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 SendinBlue
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 356 additions & 2 deletions
Large diffs are not rendered by default.

docs/AccountApi.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# sib_api_v3_sdk.AccountApi
2+
3+
All URIs are relative to *https://api.sendinblue.com/v3*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**get_account**](AccountApi.md#get_account) | **GET** /account | Get your account informations, plans and credits details
8+
9+
10+
# **get_account**
11+
> GetAccount get_account()
12+
13+
Get your account informations, plans and credits details
14+
15+
### Example
16+
```python
17+
from __future__ import print_function
18+
import time
19+
import sib_api_v3_sdk
20+
from sib_api_v3_sdk.rest import ApiException
21+
from pprint import pprint
22+
23+
# Configure API key authorization: api-key
24+
sib_api_v3_sdk.configuration.api_key['api-key'] = 'YOUR_API_KEY'
25+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
26+
# sib_api_v3_sdk.configuration.api_key_prefix['api-key'] = 'Bearer'
27+
28+
# create an instance of the API class
29+
api_instance = sib_api_v3_sdk.AccountApi()
30+
31+
try:
32+
# Get your account informations, plans and credits details
33+
api_response = api_instance.get_account()
34+
pprint(api_response)
35+
except ApiException as e:
36+
print("Exception when calling AccountApi->get_account: %s\n" % e)
37+
```
38+
39+
### Parameters
40+
This endpoint does not need any parameter.
41+
42+
### Return type
43+
44+
[**GetAccount**](GetAccount.md)
45+
46+
### Authorization
47+
48+
[api-key](../README.md#api-key)
49+
50+
### HTTP request headers
51+
52+
- **Content-Type**: application/json
53+
- **Accept**: application/json
54+
55+
[[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)
56+

docs/AddCredits.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AddCredits
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**sms** | **int** | SMS credits to be added to the child account | [optional]
7+
**email** | **int** | Email credits to be added to the child account | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

docs/AddRemoveContactToList.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# AddRemoveContactToList
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**emails** | **list[str]** | Emails to add or remove from a list | [optional]
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+
10+

docs/AttributesApi.md

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
# sib_api_v3_sdk.AttributesApi
2+
3+
All URIs are relative to *https://api.sendinblue.com/v3*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**create_attribute**](AttributesApi.md#create_attribute) | **POST** /contacts/attributes | Creates contact attributes
8+
[**delete_attribute**](AttributesApi.md#delete_attribute) | **DELETE** /contacts/attributes/{attributeId} | Deletes an attribute
9+
[**get_attributes**](AttributesApi.md#get_attributes) | **GET** /contacts/attributes | Lists all attributes
10+
11+
12+
# **create_attribute**
13+
> CreateModel create_attribute(create_attribute)
14+
15+
Creates contact attributes
16+
17+
### Example
18+
```python
19+
from __future__ import print_function
20+
import time
21+
import sib_api_v3_sdk
22+
from sib_api_v3_sdk.rest import ApiException
23+
from pprint import pprint
24+
25+
# Configure API key authorization: api-key
26+
sib_api_v3_sdk.configuration.api_key['api-key'] = 'YOUR_API_KEY'
27+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
28+
# sib_api_v3_sdk.configuration.api_key_prefix['api-key'] = 'Bearer'
29+
30+
# create an instance of the API class
31+
api_instance = sib_api_v3_sdk.AttributesApi()
32+
create_attribute = sib_api_v3_sdk.CreateAttribute() # CreateAttribute | Values to create an attribute
33+
34+
try:
35+
# Creates contact attributes
36+
api_response = api_instance.create_attribute(create_attribute)
37+
pprint(api_response)
38+
except ApiException as e:
39+
print("Exception when calling AttributesApi->create_attribute: %s\n" % e)
40+
```
41+
42+
### Parameters
43+
44+
Name | Type | Description | Notes
45+
------------- | ------------- | ------------- | -------------
46+
**create_attribute** | [**CreateAttribute**](CreateAttribute.md)| Values to create an attribute |
47+
48+
### Return type
49+
50+
[**CreateModel**](CreateModel.md)
51+
52+
### Authorization
53+
54+
[api-key](../README.md#api-key)
55+
56+
### HTTP request headers
57+
58+
- **Content-Type**: application/json
59+
- **Accept**: application/json
60+
61+
[[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)
62+
63+
# **delete_attribute**
64+
> delete_attribute(attribute_id)
65+
66+
Deletes an attribute
67+
68+
### Example
69+
```python
70+
from __future__ import print_function
71+
import time
72+
import sib_api_v3_sdk
73+
from sib_api_v3_sdk.rest import ApiException
74+
from pprint import pprint
75+
76+
# Configure API key authorization: api-key
77+
sib_api_v3_sdk.configuration.api_key['api-key'] = 'YOUR_API_KEY'
78+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
79+
# sib_api_v3_sdk.configuration.api_key_prefix['api-key'] = 'Bearer'
80+
81+
# create an instance of the API class
82+
api_instance = sib_api_v3_sdk.AttributesApi()
83+
attribute_id = 'attribute_id_example' # str | id of the attribute
84+
85+
try:
86+
# Deletes an attribute
87+
api_instance.delete_attribute(attribute_id)
88+
except ApiException as e:
89+
print("Exception when calling AttributesApi->delete_attribute: %s\n" % e)
90+
```
91+
92+
### Parameters
93+
94+
Name | Type | Description | Notes
95+
------------- | ------------- | ------------- | -------------
96+
**attribute_id** | **str**| id of the attribute |
97+
98+
### Return type
99+
100+
void (empty response body)
101+
102+
### Authorization
103+
104+
[api-key](../README.md#api-key)
105+
106+
### HTTP request headers
107+
108+
- **Content-Type**: application/json
109+
- **Accept**: application/json
110+
111+
[[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)
112+
113+
# **get_attributes**
114+
> GetAttributes get_attributes()
115+
116+
Lists all attributes
117+
118+
### Example
119+
```python
120+
from __future__ import print_function
121+
import time
122+
import sib_api_v3_sdk
123+
from sib_api_v3_sdk.rest import ApiException
124+
from pprint import pprint
125+
126+
# Configure API key authorization: api-key
127+
sib_api_v3_sdk.configuration.api_key['api-key'] = 'YOUR_API_KEY'
128+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
129+
# sib_api_v3_sdk.configuration.api_key_prefix['api-key'] = 'Bearer'
130+
131+
# create an instance of the API class
132+
api_instance = sib_api_v3_sdk.AttributesApi()
133+
134+
try:
135+
# Lists all attributes
136+
api_response = api_instance.get_attributes()
137+
pprint(api_response)
138+
except ApiException as e:
139+
print("Exception when calling AttributesApi->get_attributes: %s\n" % e)
140+
```
141+
142+
### Parameters
143+
This endpoint does not need any parameter.
144+
145+
### Return type
146+
147+
[**GetAttributes**](GetAttributes.md)
148+
149+
### Authorization
150+
151+
[api-key](../README.md#api-key)
152+
153+
### HTTP request headers
154+
155+
- **Content-Type**: application/json
156+
- **Accept**: application/json
157+
158+
[[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)
159+

0 commit comments

Comments
 (0)