Skip to content

Commit 8fb5307

Browse files
committed
Travis update: Mar 2025 (Build 822)
[skip ci]
1 parent bd0cf43 commit 8fb5307

File tree

168 files changed

+6867
-13260
lines changed

Some content is hidden

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

168 files changed

+6867
-13260
lines changed

.gitignore

Lines changed: 65 additions & 241 deletions
Large diffs are not rendered by default.

.openapi-generator/FILES

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

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.11.0
1+
3.3.4

README.md

Lines changed: 23 additions & 64 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-
- C# package version: 4.0.0
4+
- C# package version: 2.2.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

@@ -11,11 +11,11 @@ Install Messente API library via NuGet Package Manager or .NET CLI.
1111

1212
### Package Manager
1313

14-
`Install-Package com.Messente.Api -Version 4.0.0`
14+
`Install-Package com.Messente.Api -Version 2.2.0`
1515

1616
### .NET CLI
1717

18-
`dotnet add package com.Messente.Api --version 4.0.0`
18+
`dotnet add package com.Messente.Api --version 2.2.0`
1919

2020
## Features
2121

@@ -33,10 +33,6 @@ Messente API Library provides the operations described below to access the featu
3333
1. Returns all blacklisted phone numbers [`FetchBlacklist`](docs/BlacklistApi.md#fetchblacklist)
3434
1. Checks if a phone number is blacklisted [`IsBlacklisted`](docs/BlacklistApi.md#isblacklisted)
3535

36-
### BulkMessagingApi
37-
38-
1. Sends a bulk Omnimessage [`SendBulkOmnimessage`](docs/BulkMessagingApi.md#sendbulkomnimessage)
39-
4036
### ContactsApi
4137

4238
1. Adds a contact to a group [`AddContactToGroup`](docs/ContactsApi.md#addcontacttogroup)
@@ -82,9 +78,9 @@ Read the [external getting-started article](https://messente.com/documentation/g
8278
## Getting started: sending an omnimessage
8379

8480
```cs
85-
// PM > Install-Package com.Messente.Api
86-
8781
using System;
82+
using System.Diagnostics;
83+
using System.Collections.Generic;
8884
using com.Messente.Api.Api;
8985
using com.Messente.Api.Client;
9086
using com.Messente.Api.Model;
@@ -95,70 +91,33 @@ namespace Example
9591
{
9692
public static void Main()
9793
{
98-
Configuration conf = new Configuration
99-
{
100-
Username = "YOUR_MESSENTE_API_USERNAME",
101-
Password = "YOUR_MESSENTE_API_PASSWORD"
102-
};
103-
104-
var apiInstance = new OmnimessageApi(conf);
94+
// Configure HTTP basic authorization: basicAuth
95+
Configuration.Default.Username = "<MESSENTE_API_USERNAME>";
96+
Configuration.Default.Password = "<MESSENTE_API_PASSWORD>";
10597

106-
var sms = new SMS(sender: "<sender name (optional)>", text: "Hello SMS!");
107-
OmnimessageMessagesInner smsOmnimessageInner = new OmnimessageMessagesInner(sms)
108-
{
109-
ActualInstance = sms
110-
};
98+
List<object> messages = new List<object>();
99+
var sms = new SMS(sender: "<sender number or name>", text: "Hello SMS!");
100+
var viber = new Viber(text: "Hello viber!");
101+
var whatsapp = new WhatsApp(text: new WhatsAppText(body: "Hello WhatsApp!"));
102+
messages.Add(viber);
103+
messages.Add(whatsapp);
104+
messages.Add(sms);
111105

112-
var viber = new Viber(sender: "<sender name (optional)>", text: "Hello viber!");
113-
OmnimessageMessagesInner viberOmnimessageInner = new OmnimessageMessagesInner(viber)
114-
{
115-
ActualInstance = viber
116-
};
117-
118-
WhatsAppParameter whatsAppParameter = new WhatsAppParameter(
119-
type: "text",
120-
text: "hello whatsapp"
121-
);
122-
123-
WhatsAppComponent whatsAppComponent = new WhatsAppComponent(
124-
type: "body",
125-
parameters: new List<WhatsAppParameter> { whatsAppParameter }
126-
);
127-
128-
WhatsAppTemplate whatsAppTemplate = new WhatsAppTemplate(
129-
name: "<template_name>",
130-
language: new WhatsAppLanguage(code: "<language_code>"),
131-
components: new List<WhatsAppComponent> { whatsAppComponent }
132-
);
133-
134-
var whatsapp = new WhatsApp(
135-
sender: "<sender name (optional)>",
136-
template: whatsAppTemplate
137-
);
138-
139-
OmnimessageMessagesInner whatsAppOmnimessageInner = new OmnimessageMessagesInner(whatsapp)
140-
{
141-
ActualInstance = whatsapp
142-
};
143-
144-
var omnimessage = new Omnimessage(
145-
to: "<recipient_phone_number>",
146-
messages: new List<OmnimessageMessagesInner> {
147-
smsOmnimessageInner,
148-
viberOmnimessageInner,
149-
whatsAppOmnimessageInner
150-
}
151-
);
106+
var apiInstance = new OmnimessageApi();
107+
var omnimessage = new Omnimessage(to: "<phone_number>", messages: messages);
152108

153109
try
154110
{
155-
var result = apiInstance.SendOmnimessage(omnimessage);
156-
Console.WriteLine(result.ToJson());
111+
// Sends an Omnimessage
112+
OmniMessageCreateSuccessResponse result = apiInstance.SendOmnimessage(omnimessage);
113+
Debug.WriteLine(result);
157114
}
158115
catch (Exception e)
159116
{
160-
Console.WriteLine("Exception when calling SendOmnimessage: " + e.Message);
117+
Debug.Print("Exception when calling SendOmnimessage: " + e.Message);
118+
161119
}
120+
162121
}
163122
}
164123
}

0 commit comments

Comments
 (0)