Skip to content

Commit

Permalink
Merge pull request #21 from messente/travis
Browse files Browse the repository at this point in the history
Release version 3.0.0
  • Loading branch information
krystian-wojakiewicz authored Jul 8, 2024
2 parents 9cc0ae8 + 7803fd6 commit bbd8ae8
Show file tree
Hide file tree
Showing 156 changed files with 12,368 additions and 7,935 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ composer.phar

# php-cs-fixer cache
.php_cs.cache
.php-cs-fixer.cache

# PHPUnit cache
.phpunit.result.cache
91 changes: 25 additions & 66 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
.gitignore
.openapi-generator-ignore
.php_cs
.php-cs-fixer.dist.php
.travis.yml
README.md
composer.json
docs/Api/BlacklistApi.md
docs/Api/BulkMessagingApi.md
docs/Api/ContactsApi.md
docs/Api/DeliveryReportApi.md
docs/Api/GroupsApi.md
docs/Api/NumberLookupApi.md
docs/Api/OmnimessageApi.md
docs/Api/StatisticsApi.md
docs/Model/BulkOmniMessageCreateSuccessResponse.md
docs/Model/BulkOmniMessageCreateSuccessResponseMessagesInner.md
docs/Model/BulkOmnimessage.md
docs/Model/Channel.md
docs/Model/ContactEnvelope.md
docs/Model/ContactFields.md
Expand Down Expand Up @@ -45,6 +49,7 @@ docs/Model/NumberToBlacklist.md
docs/Model/NumbersToInvestigate.md
docs/Model/OmniMessageCreateSuccessResponse.md
docs/Model/Omnimessage.md
docs/Model/OmnimessageMessagesInner.md
docs/Model/Priority.md
docs/Model/SMS.md
docs/Model/StatisticsReport.md
Expand All @@ -57,12 +62,16 @@ docs/Model/Telegram.md
docs/Model/TextStore.md
docs/Model/Viber.md
docs/Model/WhatsApp.md
docs/Model/WhatsAppAudio.md
docs/Model/WhatsAppDocument.md
docs/Model/WhatsAppImage.md
docs/Model/WhatsAppText.md
docs/Model/WhatsAppComponent.md
docs/Model/WhatsAppCurrency.md
docs/Model/WhatsAppDatetime.md
docs/Model/WhatsAppLanguage.md
docs/Model/WhatsAppMedia.md
docs/Model/WhatsAppParameter.md
docs/Model/WhatsAppTemplate.md
git_push.sh
lib/Api/BlacklistApi.php
lib/Api/BulkMessagingApi.php
lib/Api/ContactsApi.php
lib/Api/DeliveryReportApi.php
lib/Api/GroupsApi.php
Expand All @@ -72,6 +81,9 @@ lib/Api/StatisticsApi.php
lib/ApiException.php
lib/Configuration.php
lib/HeaderSelector.php
lib/Model/BulkOmniMessageCreateSuccessResponse.php
lib/Model/BulkOmniMessageCreateSuccessResponseMessagesInner.php
lib/Model/BulkOmnimessage.php
lib/Model/Channel.php
lib/Model/ContactEnvelope.php
lib/Model/ContactFields.php
Expand Down Expand Up @@ -107,6 +119,7 @@ lib/Model/NumberToBlacklist.php
lib/Model/NumbersToInvestigate.php
lib/Model/OmniMessageCreateSuccessResponse.php
lib/Model/Omnimessage.php
lib/Model/OmnimessageMessagesInner.php
lib/Model/Priority.php
lib/Model/SMS.php
lib/Model/StatisticsReport.php
Expand All @@ -119,66 +132,12 @@ lib/Model/Telegram.php
lib/Model/TextStore.php
lib/Model/Viber.php
lib/Model/WhatsApp.php
lib/Model/WhatsAppAudio.php
lib/Model/WhatsAppDocument.php
lib/Model/WhatsAppImage.php
lib/Model/WhatsAppText.php
lib/Model/WhatsAppComponent.php
lib/Model/WhatsAppCurrency.php
lib/Model/WhatsAppDatetime.php
lib/Model/WhatsAppLanguage.php
lib/Model/WhatsAppMedia.php
lib/Model/WhatsAppParameter.php
lib/Model/WhatsAppTemplate.php
lib/ObjectSerializer.php
phpunit.xml.dist
test/Api/BlacklistApiTest.php
test/Api/ContactsApiTest.php
test/Api/DeliveryReportApiTest.php
test/Api/GroupsApiTest.php
test/Api/NumberLookupApiTest.php
test/Api/OmnimessageApiTest.php
test/Api/StatisticsApiTest.php
test/Model/ChannelTest.php
test/Model/ContactEnvelopeTest.php
test/Model/ContactFieldsTest.php
test/Model/ContactListEnvelopeTest.php
test/Model/ContactResponseFieldsTest.php
test/Model/ContactUpdateFieldsTest.php
test/Model/DeliveryReportResponseTest.php
test/Model/DeliveryResultTest.php
test/Model/ErrorCodeOmnichannelMachineTest.php
test/Model/ErrorCodeOmnichannelTest.php
test/Model/ErrorCodePhonebookTest.php
test/Model/ErrorCodeStatisticsTest.php
test/Model/ErrorItemNumberLookupErrorTest.php
test/Model/ErrorItemNumberLookupTest.php
test/Model/ErrorItemOmnichannelTest.php
test/Model/ErrorItemPhonebookTest.php
test/Model/ErrorItemStatisticsTest.php
test/Model/ErrorNumberLookupTest.php
test/Model/ErrorOmnichannelTest.php
test/Model/ErrorPhonebookTest.php
test/Model/ErrorStatisticsTest.php
test/Model/ErrorTitleOmnichannelTest.php
test/Model/ErrorTitlePhonebookTest.php
test/Model/FetchBlacklistSuccessTest.php
test/Model/GroupEnvelopeTest.php
test/Model/GroupListEnvelopeTest.php
test/Model/GroupNameTest.php
test/Model/GroupResponseFieldsTest.php
test/Model/MessageResultTest.php
test/Model/MobileNetworkTest.php
test/Model/NumberToBlacklistTest.php
test/Model/NumbersToInvestigateTest.php
test/Model/OmniMessageCreateSuccessResponseTest.php
test/Model/OmnimessageTest.php
test/Model/PriorityTest.php
test/Model/SMSTest.php
test/Model/StatisticsReportSettingsTest.php
test/Model/StatisticsReportSuccessTest.php
test/Model/StatisticsReportTest.php
test/Model/StatusTest.php
test/Model/SyncNumberLookupResultTest.php
test/Model/SyncNumberLookupSuccessTest.php
test/Model/TelegramTest.php
test/Model/TextStoreTest.php
test/Model/ViberTest.php
test/Model/WhatsAppAudioTest.php
test/Model/WhatsAppDocumentTest.php
test/Model/WhatsAppImageTest.php
test/Model/WhatsAppTest.php
test/Model/WhatsAppTextTest.php
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.3.0
7.6.0
29 changes: 29 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

/**
* @generated
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/HEAD/doc/config.rst
*/
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('vendor')
->exclude('test')
->exclude('tests')
;

$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'phpdoc_order' => true,
'array_syntax' => [ 'syntax' => 'short' ],
'strict_comparison' => true,
'strict_param' => true,
'no_trailing_whitespace' => false,
'no_trailing_whitespace_in_comment' => false,
'braces' => false,
'single_blank_line_at_eof' => false,
'blank_line_after_namespace' => false,
'no_leading_import_slash' => false,
])
->setFinder($finder)
;
23 changes: 0 additions & 23 deletions .php_cs

This file was deleted.

1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ language: php
# https://docs.travis-ci.com/user/reference/bionic/#php-support
dist: bionic
php:
- 7.3
- 7.4
before_install: "composer install"
script: "vendor/bin/phpunit"
38 changes: 27 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Messente API Library

- Messente API version: 2.0.0
- PHP artifact version: 2.1.0
- PHP artifact version: 3.0.0

[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&#39;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.

Expand All @@ -25,6 +25,10 @@ Messente API Library provides the operations described below to access the featu
1. Returns all blacklisted phone numbers [`fetchBlacklist`](docs/Api/BlacklistApi.md#fetchblacklist)
1. Checks if a phone number is blacklisted [`isBlacklisted`](docs/Api/BlacklistApi.md#isblacklisted)

### BulkMessagingApi

1. Sends a bulk Omnimessage [`sendBulkOmnimessage`](docs/Api/BulkMessagingApi.md#sendbulkomnimessage)

### ContactsApi

1. Adds a contact to a group [`addContactToGroup`](docs/Api/ContactsApi.md#addcontacttogroup)
Expand Down Expand Up @@ -73,13 +77,14 @@ Read the [external getting-started article](https://messente.com/documentation/g
<?php
require_once(__DIR__ . '/../vendor/autoload.php');

use \Messente\Api\Api\OmnimessageApi;
use \Messente\Api\Configuration;
use \Messente\Api\Model\Omnimessage;
use \Messente\Api\Model\Viber;
use \Messente\Api\Model\SMS;
use \Messente\Api\Model\WhatsApp;
use \Messente\Api\Model\WhatsAppText;
use Messente\Api\Api\OmnimessageApi;
use Messente\Api\Model\Omnimessage;
use Messente\Api\Configuration;
use Messente\Api\Model\WhatsApp;
use Messente\Api\Model\WhatsAppParameter;
use Messente\Api\Model\WhatsAppComponent;
use Messente\Api\Model\WhatsAppLanguage;
use Messente\Api\Model\WhatsAppTemplate;


// Configure HTTP basic authorization: basicAuth
Expand All @@ -104,11 +109,22 @@ $sms = new SMS(
["text" => "Hello SMS!", "sender" => "MySmsSender"]
);


$whatsAppText = new WhatsAppText(["body" => "Hello WhatsApp!"]);
$whatsAppParameters = [new WhatsAppParameter(['type' => 'text', 'text' => 'hello whatsapp'])];
$whatsAppComponent = new WhatsAppComponent(['type' => 'body', 'parameters' => $whatsAppParameters]);
$whatsAppLanguage = new WhatsAppLanguage(['code' => '<language_code>']);
$whatsAppTemplate = new WhatsAppTemplate(
[
'name'=> '<template_name>',
'language'=> $whatsAppLanguage,
'components' => [$whatsAppComponent]
]
);

$whatsapp = new WhatsApp(
['text' => $whatsAppText, "sender" => "MyWhatsAppSender"]
[
'sender' => '<sender name (optional)>',
'template' => $whatsAppTemplate,
]
);

$omnimessage->setMessages([$whatsapp, $viber, $sms]);
Expand Down
6 changes: 1 addition & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "messente/messente-api-php",
"version": "2.1.0",
"version": "3.0.0",
"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.",
"keywords": ["viber", "telegram", "sms", "whatsapp", "phonebook", "openapitools",
"openapi-generator",
Expand All @@ -26,10 +26,6 @@
"guzzlehttp/guzzle": "^6.2 || ^7.0",
"guzzlehttp/psr7": "^1.8 || ^2.0"
},
"require-dev": {
"phpunit/phpunit": "^7.4",
"friendsofphp/php-cs-fixer": "^2.12"
},
"autoload": {
"psr-4": { "Messente\\Api\\" : "lib/" }
},
Expand Down
32 changes: 16 additions & 16 deletions docs/Api/BlacklistApi.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Messente\Api\BlacklistApi

All URIs are relative to https://api.messente.com/v1.
All URIs are relative to https://api.messente.com/v1, except if the operation defines another base path.

Method | HTTP request | Description
------------- | ------------- | -------------
[**addToBlacklist()**](BlacklistApi.md#addToBlacklist) | **POST** /phonebook/blacklist | Adds a phone number to the blacklist
[**deleteFromBlacklist()**](BlacklistApi.md#deleteFromBlacklist) | **DELETE** /phonebook/blacklist/{phone} | Deletes a phone number from the blacklist
[**fetchBlacklist()**](BlacklistApi.md#fetchBlacklist) | **GET** /phonebook/blacklist | Returns all blacklisted phone numbers
[**isBlacklisted()**](BlacklistApi.md#isBlacklisted) | **GET** /phonebook/blacklist/{phone} | Checks if a phone number is blacklisted
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**addToBlacklist()**](BlacklistApi.md#addToBlacklist) | **POST** /phonebook/blacklist | Adds a phone number to the blacklist |
| [**deleteFromBlacklist()**](BlacklistApi.md#deleteFromBlacklist) | **DELETE** /phonebook/blacklist/{phone} | Deletes a phone number from the blacklist |
| [**fetchBlacklist()**](BlacklistApi.md#fetchBlacklist) | **GET** /phonebook/blacklist | Returns all blacklisted phone numbers |
| [**isBlacklisted()**](BlacklistApi.md#isBlacklisted) | **GET** /phonebook/blacklist/{phone} | Checks if a phone number is blacklisted |


## `addToBlacklist()`
Expand Down Expand Up @@ -48,9 +48,9 @@ try {

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**numberToBlacklist** | [**\Messente\Api\Model\NumberToBlacklist**](../Model/NumberToBlacklist.md)| Phone number to be blacklisted |
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **numberToBlacklist** | [**\Messente\Api\Model\NumberToBlacklist**](../Model/NumberToBlacklist.md)| Phone number to be blacklisted | |

### Return type

Expand Down Expand Up @@ -107,9 +107,9 @@ try {

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**phone** | **string**| A phone number |
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **phone** | **string**| A phone number | |

### Return type

Expand Down Expand Up @@ -223,9 +223,9 @@ try {

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**phone** | **string**| A phone number |
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **phone** | **string**| A phone number | |

### Return type

Expand Down
Loading

0 comments on commit bbd8ae8

Please sign in to comment.