Skip to content

Commit 81996db

Browse files
author
Erik Räni
authored
🎉 1.2.1 (#7)
1 parent 7d84dbe commit 81996db

File tree

123 files changed

+1456
-676
lines changed

Some content is hidden

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

123 files changed

+1456
-676
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ coverage.xml
4545
*,cover
4646
.hypothesis/
4747
venv/
48+
.venv/
4849
.python-version
50+
.pytest_cache
4951

5052
# Translations
5153
*.mo

.gitlab-ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# ref: https://docs.gitlab.com/ee/ci/README.html
2+
3+
stages:
4+
- test
5+
6+
.nosetest:
7+
stage: test
8+
script:
9+
- pip install -r requirements.txt
10+
- pip install -r test-requirements.txt
11+
- pytest --cov=messente_api
12+
13+
nosetest-2.7:
14+
extends: .nosetest
15+
image: python:2.7-alpine
16+
nosetest-3.3:
17+
extends: .nosetest
18+
image: python:3.3-alpine
19+
nosetest-3.4:
20+
extends: .nosetest
21+
image: python:3.4-alpine
22+
nosetest-3.5:
23+
extends: .nosetest
24+
image: python:3.5-alpine
25+
nosetest-3.6:
26+
extends: .nosetest
27+
image: python:3.6-alpine
28+
nosetest-3.7:
29+
extends: .nosetest
30+
image: python:3.7-alpine
31+
nosetest-3.8:
32+
extends: .nosetest
33+
image: python:3.8-alpine

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.3
1+
4.3.0

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Messente API Library
22

33
- Messente API version: 1.2.0
4-
- Python package version: 1.2.0
4+
- Python package version: 1.2.1
55

66
[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.
77

docs/BlacklistApi.md

Lines changed: 48 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,18 @@ configuration.password = 'YOUR_PASSWORD'
3131

3232
# Defining host is optional and default to https://api.messente.com/v1
3333
configuration.host = "https://api.messente.com/v1"
34-
# Create an instance of the API class
35-
api_instance = messente_api.BlacklistApi(messente_api.ApiClient(configuration))
36-
number_to_blacklist = {"phoneNumber":"+37251000000"} # NumberToBlacklist | Phone number to be blacklisted
37-
38-
try:
39-
# Adds a phone number to the blacklist
40-
api_instance.add_to_blacklist(number_to_blacklist)
41-
except ApiException as e:
42-
print("Exception when calling BlacklistApi->add_to_blacklist: %s\n" % e)
34+
35+
# Enter a context with an instance of the API client
36+
with messente_api.ApiClient(configuration) as api_client:
37+
# Create an instance of the API class
38+
api_instance = messente_api.BlacklistApi(api_client)
39+
number_to_blacklist = {"phoneNumber":"+37251000000"} # NumberToBlacklist | Phone number to be blacklisted
40+
41+
try:
42+
# Adds a phone number to the blacklist
43+
api_instance.add_to_blacklist(number_to_blacklist)
44+
except ApiException as e:
45+
print("Exception when calling BlacklistApi->add_to_blacklist: %s\n" % e)
4346
```
4447

4548
### Parameters
@@ -93,15 +96,18 @@ configuration.password = 'YOUR_PASSWORD'
9396

9497
# Defining host is optional and default to https://api.messente.com/v1
9598
configuration.host = "https://api.messente.com/v1"
96-
# Create an instance of the API class
97-
api_instance = messente_api.BlacklistApi(messente_api.ApiClient(configuration))
98-
phone = '+37251000000' # str | A phone number
99-
100-
try:
101-
# Deletes a phone number from the blacklist
102-
api_instance.delete_from_blacklist(phone)
103-
except ApiException as e:
104-
print("Exception when calling BlacklistApi->delete_from_blacklist: %s\n" % e)
99+
100+
# Enter a context with an instance of the API client
101+
with messente_api.ApiClient(configuration) as api_client:
102+
# Create an instance of the API class
103+
api_instance = messente_api.BlacklistApi(api_client)
104+
phone = '+37251000000' # str | A phone number
105+
106+
try:
107+
# Deletes a phone number from the blacklist
108+
api_instance.delete_from_blacklist(phone)
109+
except ApiException as e:
110+
print("Exception when calling BlacklistApi->delete_from_blacklist: %s\n" % e)
105111
```
106112

107113
### Parameters
@@ -155,15 +161,18 @@ configuration.password = 'YOUR_PASSWORD'
155161

156162
# Defining host is optional and default to https://api.messente.com/v1
157163
configuration.host = "https://api.messente.com/v1"
158-
# Create an instance of the API class
159-
api_instance = messente_api.BlacklistApi(messente_api.ApiClient(configuration))
160-
161-
try:
162-
# Returns all blacklisted phone numbers
163-
api_response = api_instance.fetch_blacklist()
164-
pprint(api_response)
165-
except ApiException as e:
166-
print("Exception when calling BlacklistApi->fetch_blacklist: %s\n" % e)
164+
165+
# Enter a context with an instance of the API client
166+
with messente_api.ApiClient(configuration) as api_client:
167+
# Create an instance of the API class
168+
api_instance = messente_api.BlacklistApi(api_client)
169+
170+
try:
171+
# Returns all blacklisted phone numbers
172+
api_response = api_instance.fetch_blacklist()
173+
pprint(api_response)
174+
except ApiException as e:
175+
print("Exception when calling BlacklistApi->fetch_blacklist: %s\n" % e)
167176
```
168177

169178
### Parameters
@@ -212,15 +221,18 @@ configuration.password = 'YOUR_PASSWORD'
212221

213222
# Defining host is optional and default to https://api.messente.com/v1
214223
configuration.host = "https://api.messente.com/v1"
215-
# Create an instance of the API class
216-
api_instance = messente_api.BlacklistApi(messente_api.ApiClient(configuration))
217-
phone = '+37251000000' # str | A phone number
218-
219-
try:
220-
# Checks if a phone number is blacklisted
221-
api_instance.is_blacklisted(phone)
222-
except ApiException as e:
223-
print("Exception when calling BlacklistApi->is_blacklisted: %s\n" % e)
224+
225+
# Enter a context with an instance of the API client
226+
with messente_api.ApiClient(configuration) as api_client:
227+
# Create an instance of the API class
228+
api_instance = messente_api.BlacklistApi(api_client)
229+
phone = '+37251000000' # str | A phone number
230+
231+
try:
232+
# Checks if a phone number is blacklisted
233+
api_instance.is_blacklisted(phone)
234+
except ApiException as e:
235+
print("Exception when calling BlacklistApi->is_blacklisted: %s\n" % e)
224236
```
225237

226238
### Parameters

docs/Channel.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Channel
22

3+
Defines the delivery channel
34
## Properties
45
Name | Type | Description | Notes
56
------------ | ------------- | ------------- | -------------

docs/ContactEnvelope.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# ContactEnvelope
22

3+
A container for a contact
34
## Properties
45
Name | Type | Description | Notes
56
------------ | ------------- | ------------- | -------------

docs/ContactFields.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# ContactFields
22

3+
A container for fields of a contact
34
## Properties
45
Name | Type | Description | Notes
56
------------ | ------------- | ------------- | -------------

docs/ContactListEnvelope.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# ContactListEnvelope
22

3+
A container for contacts
34
## Properties
45
Name | Type | Description | Notes
56
------------ | ------------- | ------------- | -------------

docs/ContactUpdateFields.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# ContactUpdateFields
22

3+
A container for fields of a contact
34
## Properties
45
Name | Type | Description | Notes
56
------------ | ------------- | ------------- | -------------

0 commit comments

Comments
 (0)