Skip to content

Commit 8b2c2f9

Browse files
Merge pull request #14 from messente/travis
Release version 2.0.0
2 parents 5e99905 + 21d292c commit 8b2c2f9

Some content is hidden

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

72 files changed

+964
-220
lines changed

README.md

Lines changed: 14 additions & 7 deletions
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-
- NPM package version: 1.5.0
4+
- NPM 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 [`fetchBlacklist`](docs/BlacklistApi.md#fetchblacklist)
2626
1. Checks if a phone number is blacklisted [`isBlacklisted`](docs/BlacklistApi.md#isblacklisted)
2727

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

3034
1. Adds a contact to a group [`addContactToGroup`](docs/ContactsApi.md#addcontacttogroup)
@@ -90,19 +94,22 @@ const sms = MessenteApi.SMS.constructFromObject({
9094
text: 'Hello SMS!',
9195
});
9296

93-
const whatsAppText = MessenteApi.WhatsAppText.constructFromObject({
94-
body: 'Hello WhatsApp!',
95-
preview_url: false,
97+
const whatsAppParameters = [MessenteApi.WhatsAppParameter.constructFromObject({type: 'text', text: 'hello whatsapp'})];
98+
const whatsAppComponent = MessenteApi.WhatsAppComponent.constructFromObject({type: 'body', parameters: whatsAppParameters});
99+
const whatsAppTemplate = MessenteApi.WhatsAppTemplate.constructFromObject({
100+
name: '<template_name>',
101+
language: new MessenteApi.WhatsAppLanguage(code='<language_code>'),
102+
components: [whatsAppComponent],
96103
});
97104

98-
99105
const whatsapp = MessenteApi.WhatsApp.constructFromObject({
100-
text: whatsAppText,
106+
sender: "<sender name (optional)>",
107+
template: whatsAppTemplate,
101108
});
102109

103110
const omnimessage = MessenteApi.Omnimessage.constructFromObject({
104111
messages: [whatsapp, viber, sms],
105-
to: '<phone number in e.164 format',
112+
to: '<recipient_phone_number>',
106113
});
107114

108115
api.sendOmnimessage(omnimessage, (error, data) => {

docs/BulkMessagingApi.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# MessenteApi.BulkMessagingApi
2+
3+
All URIs are relative to *https://api.messente.com/v1*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**sendBulkOmnimessage**](BulkMessagingApi.md#sendBulkOmnimessage) | **POST** /omnimessages | Sends a bulk Omnimessage
8+
9+
10+
<a name="sendBulkOmnimessage"></a>
11+
# **sendBulkOmnimessage**
12+
> BulkOmniMessageCreateSuccessResponse sendBulkOmnimessage(bulkOmnimessage)
13+
14+
Sends a bulk Omnimessage
15+
16+
### Example
17+
```javascript
18+
var MessenteApi = require('messente_api');
19+
var defaultClient = MessenteApi.ApiClient.instance;
20+
21+
// Configure HTTP basic authorization: basicAuth
22+
var basicAuth = defaultClient.authentications['basicAuth'];
23+
basicAuth.username = 'YOUR USERNAME';
24+
basicAuth.password = 'YOUR PASSWORD';
25+
26+
var apiInstance = new MessenteApi.BulkMessagingApi();
27+
var bulkOmnimessage = new MessenteApi.BulkOmnimessage(); // BulkOmnimessage | Bulk Omnimessage to be sent
28+
var callback = function(error, data, response) {
29+
if (error) {
30+
console.error(error);
31+
} else {
32+
console.log('API called successfully. Returned data: ' + data);
33+
}
34+
};
35+
apiInstance.sendBulkOmnimessage(bulkOmnimessage, callback);
36+
```
37+
38+
### Parameters
39+
40+
Name | Type | Description | Notes
41+
------------- | ------------- | ------------- | -------------
42+
**bulkOmnimessage** | [**BulkOmnimessage**](BulkOmnimessage.md)| Bulk Omnimessage to be sent |
43+
44+
### Return type
45+
46+
[**BulkOmniMessageCreateSuccessResponse**](BulkOmniMessageCreateSuccessResponse.md)
47+
48+
### Authorization
49+
50+
[basicAuth](../README.md#basicAuth)
51+
52+
### HTTP request headers
53+
54+
- **Content-Type**: application/json
55+
- **Accept**: application/json
56+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# MessenteApi.BulkOmniMessageCreateSuccessResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**messages** | **[Object]** | List of responses for each Omnimessage in the bulk. These can be errors or successful responses |
7+
8+

docs/BulkOmnimessage.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# MessenteApi.BulkOmnimessage
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**messages** | [**[Omnimessage]**](Omnimessage.md) | A list of omnimessages. |
7+
8+

docs/WhatsApp.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ Name | Type | Description | Notes
66
**sender** | **String** | Phone number or alphanumeric sender name | [optional]
77
**validity** | **Number** | After how many minutes this channel is considered as failed and the next channel is attempted | [optional]
88
**ttl** | **Number** | After how many seconds this channel is considered as failed and the next channel is attempted. Only one of \&quot;ttl\&quot; and \&quot;validity\&quot; can be used. | [optional]
9-
**text** | [**WhatsAppText**](WhatsAppText.md) | | [optional]
10-
**image** | [**WhatsAppImage**](WhatsAppImage.md) | | [optional]
11-
**document** | [**WhatsAppDocument**](WhatsAppDocument.md) | | [optional]
12-
**audio** | [**WhatsAppAudio**](WhatsAppAudio.md) | | [optional]
9+
**template** | [**WhatsAppTemplate**](WhatsAppTemplate.md) | | [optional]
1310
**channel** | **String** | The channel used to deliver the message | [optional] [default to &#39;whatsapp&#39;]
1411

1512

docs/WhatsAppComponent.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# MessenteApi.WhatsAppComponent
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**type** | **String** | Type of the component |
7+
**subType** | **String** | Sub-type of the component | [optional]
8+
**index** | **Number** | index used to position buttons | [optional]
9+
**parameters** | [**[WhatsAppParameter]**](WhatsAppParameter.md) | List of parameters for the component | [optional]
10+
11+

docs/WhatsAppCurrency.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# MessenteApi.WhatsAppCurrency
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**fallbackValue** | **String** | Default text if localization fails. |
7+
**code** | **String** | Currency code as defined in ISO 4217. |
8+
**amount1000** | **String** | Amount multiplied by 1000. |
9+
10+
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# MessenteApi.WhatsAppAudio
1+
# MessenteApi.WhatsAppDatetime
22

33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**content** | **String** | Base64-encoded audio |
6+
**fallbackValue** | **String** | Default text. |
77

88

docs/WhatsAppDocument.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/WhatsAppImage.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)