Skip to content

Commit 35cba0c

Browse files
Merge pull request #17 from messente/travis
Release version 2.0.0
2 parents 10dfcf1 + 7a2ed0d commit 35cba0c

File tree

158 files changed

+12391
-11509
lines changed

Some content is hidden

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

158 files changed

+12391
-11509
lines changed

.github/workflows/python.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# NOTE: This file is auto generated by OpenAPI Generator.
2+
# URL: https://openapi-generator.tech
3+
#
4+
# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
5+
6+
name: messente_api Python package
7+
8+
on: [push, pull_request]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install flake8 pytest
28+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
29+
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
30+
- name: Lint with flake8
31+
run: |
32+
# stop the build if there are Python syntax errors or undefined names
33+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
34+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
35+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
36+
- name: Test with pytest
37+
run: |
38+
pytest

.gitlab-ci.yml

+18-20
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
1+
# NOTE: This file is auto generated by OpenAPI Generator.
2+
# URL: https://openapi-generator.tech
3+
#
14
# ref: https://docs.gitlab.com/ee/ci/README.html
5+
# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml
26

37
stages:
48
- test
59

6-
.nosetest:
10+
.pytest:
711
stage: test
812
script:
913
- pip install -r requirements.txt
1014
- pip install -r test-requirements.txt
1115
- pytest --cov=messente_api
1216

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
17+
pytest-3.7:
18+
extends: .pytest
3019
image: python:3.7-alpine
31-
nosetest-3.8:
32-
extends: .nosetest
20+
pytest-3.8:
21+
extends: .pytest
3322
image: python:3.8-alpine
23+
pytest-3.9:
24+
extends: .pytest
25+
image: python:3.9-alpine
26+
pytest-3.10:
27+
extends: .pytest
28+
image: python:3.10-alpine
29+
pytest-3.11:
30+
extends: .pytest
31+
image: python:3.11-alpine

.openapi-generator/FILES

+28-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
.github/workflows/python.yml
12
.gitignore
23
.gitlab-ci.yml
34
.openapi-generator-ignore
45
.travis.yml
56
README.md
67
docs/BlacklistApi.md
8+
docs/BulkMessagingApi.md
9+
docs/BulkOmniMessageCreateSuccessResponse.md
10+
docs/BulkOmniMessageCreateSuccessResponseMessagesInner.md
11+
docs/BulkOmnimessage.md
712
docs/Channel.md
813
docs/ContactEnvelope.md
914
docs/ContactFields.md
@@ -43,6 +48,7 @@ docs/NumbersToInvestigate.md
4348
docs/OmniMessageCreateSuccessResponse.md
4449
docs/Omnimessage.md
4550
docs/OmnimessageApi.md
51+
docs/OmnimessageMessagesInner.md
4652
docs/Priority.md
4753
docs/SMS.md
4854
docs/StatisticsApi.md
@@ -56,24 +62,32 @@ docs/Telegram.md
5662
docs/TextStore.md
5763
docs/Viber.md
5864
docs/WhatsApp.md
59-
docs/WhatsAppAudio.md
60-
docs/WhatsAppDocument.md
61-
docs/WhatsAppImage.md
62-
docs/WhatsAppText.md
65+
docs/WhatsAppComponent.md
66+
docs/WhatsAppCurrency.md
67+
docs/WhatsAppDatetime.md
68+
docs/WhatsAppLanguage.md
69+
docs/WhatsAppMedia.md
70+
docs/WhatsAppParameter.md
71+
docs/WhatsAppTemplate.md
6372
git_push.sh
6473
messente_api/__init__.py
6574
messente_api/api/__init__.py
6675
messente_api/api/blacklist_api.py
76+
messente_api/api/bulk_messaging_api.py
6777
messente_api/api/contacts_api.py
6878
messente_api/api/delivery_report_api.py
6979
messente_api/api/groups_api.py
7080
messente_api/api/number_lookup_api.py
7181
messente_api/api/omnimessage_api.py
7282
messente_api/api/statistics_api.py
7383
messente_api/api_client.py
84+
messente_api/api_response.py
7485
messente_api/configuration.py
7586
messente_api/exceptions.py
7687
messente_api/models/__init__.py
88+
messente_api/models/bulk_omni_message_create_success_response.py
89+
messente_api/models/bulk_omni_message_create_success_response_messages_inner.py
90+
messente_api/models/bulk_omnimessage.py
7791
messente_api/models/channel.py
7892
messente_api/models/contact_envelope.py
7993
messente_api/models/contact_fields.py
@@ -108,6 +122,7 @@ messente_api/models/number_to_blacklist.py
108122
messente_api/models/numbers_to_investigate.py
109123
messente_api/models/omni_message_create_success_response.py
110124
messente_api/models/omnimessage.py
125+
messente_api/models/omnimessage_messages_inner.py
111126
messente_api/models/priority.py
112127
messente_api/models/sms.py
113128
messente_api/models/statistics_report.py
@@ -120,11 +135,16 @@ messente_api/models/telegram.py
120135
messente_api/models/text_store.py
121136
messente_api/models/viber.py
122137
messente_api/models/whats_app.py
123-
messente_api/models/whats_app_audio.py
124-
messente_api/models/whats_app_document.py
125-
messente_api/models/whats_app_image.py
126-
messente_api/models/whats_app_text.py
138+
messente_api/models/whats_app_component.py
139+
messente_api/models/whats_app_currency.py
140+
messente_api/models/whats_app_datetime.py
141+
messente_api/models/whats_app_language.py
142+
messente_api/models/whats_app_media.py
143+
messente_api/models/whats_app_parameter.py
144+
messente_api/models/whats_app_template.py
145+
messente_api/py.typed
127146
messente_api/rest.py
147+
pyproject.toml
128148
requirements.txt
129149
setup.cfg
130150
setup.py

.openapi-generator/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.0
1+
7.6.0

README.md

+20-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Messente API Library
22

33
- Messente API version: 2.0.0
4-
- Python package version: 1.5.0
4+
- Python package version: 2.0.0
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

@@ -25,6 +25,10 @@ Messente API Library provides the operations described below to access the featu
2525
1. Returns all blacklisted phone numbers [`fetch_blacklist`](docs/BlacklistApi.md#fetch_blacklist)
2626
1. Checks if a phone number is blacklisted [`is_blacklisted`](docs/BlacklistApi.md#is_blacklisted)
2727

28+
### BulkMessagingApi
29+
30+
1. Sends a bulk Omnimessage [`send_bulk_omnimessage`](docs/BulkMessagingApi.md#send_bulk_omnimessage)
31+
2832
### ContactsApi
2933

3034
1. Adds a contact to a group [`add_contact_to_group`](docs/ContactsApi.md#add_contact_to_group)
@@ -73,13 +77,17 @@ Read the [external getting-started article](https://messente.com/documentation/g
7377
from pprint import pprint
7478
from messente_api import (
7579
OmnimessageApi,
76-
Viber,
77-
SMS,
7880
Omnimessage,
81+
OmnimessageMessagesInner,
7982
Configuration,
8083
ApiClient,
84+
Viber,
85+
SMS,
8186
WhatsApp,
82-
WhatsAppText
87+
WhatsAppParameter,
88+
WhatsAppComponent,
89+
WhatsAppTemplate,
90+
WhatsAppLanguage,
8391
)
8492
from messente_api.rest import ApiException
8593

@@ -91,29 +99,30 @@ configuration.password = '<MESSENTE_API_PASSWORD>'
9199
# create an instance of the API class
92100
api_instance = OmnimessageApi(ApiClient(configuration))
93101

94-
whatsapp = WhatsApp(
95-
sender='<sender name (optional)>',
96-
text=WhatsAppText(
97-
body='hello whatsapp'
98-
)
99-
)
102+
wa_parameters = [WhatsAppParameter(type='text', text='hello whatsapp')]
103+
wa_component = WhatsAppComponent(type='body', parameters=wa_parameters)
104+
wa_template = WhatsAppTemplate(name='<template name>', language=WhatsAppLanguage(code='<language_code>'), components=[wa_component])
105+
whatsapp = WhatsApp(sender='<sender name (optional)>', template=wa_template)
106+
whatsapp_inner = OmnimessageMessagesInner(whatsapp)
100107

101108
viber = Viber(
102109
sender='<sender name (optional)>',
103110
text='hello python',
104111
)
112+
viber_inner = OmnimessageMessagesInner(viber)
105113

106114
sms = SMS(
107115
sender='<sender name (optional)>',
108116
text='hello python',
109117
)
118+
sms_inner = OmnimessageMessagesInner(sms)
110119

111120
# The order of items in 'messages' specifies the sending order:
112121
# WhatsApp will be attempted first,
113122
# then Viber,
114123
# and SMS as the final fallback
115124
omnimessage = Omnimessage(
116-
messages=(whatsapp, viber, sms),
125+
messages=(whatsapp_inner, viber_inner, sms_inner),
117126
to='<recipient_phone_number>',
118127
) # Omnimessage | Omnimessage object that is to be sent
119128

0 commit comments

Comments
 (0)