Skip to content

Commit 9515feb

Browse files
author
Erik Räni
authored
1.0.0 (#1)
[skip ci]
1 parent ab3c87d commit 9515feb

File tree

96 files changed

+13042
-2
lines changed

Some content is hidden

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

96 files changed

+13042
-2
lines changed

.gitignore

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
# Ref: https://gist.github.com/kmorcinek/2710267
2+
# Download this file using PowerShell v3 under Windows with the following comand
3+
# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore
4+
5+
# User-specific files
6+
*.suo
7+
*.user
8+
*.sln.docstates
9+
./nuget
10+
11+
# Build results
12+
13+
[Dd]ebug/
14+
[Rr]elease/
15+
x64/
16+
build/
17+
[Bb]in/
18+
[Oo]bj/
19+
20+
# NuGet Packages
21+
*.nupkg
22+
# The packages folder can be ignored because of Package Restore
23+
**/packages/*
24+
# except build/, which is used as an MSBuild target.
25+
!**/packages/build/
26+
# Uncomment if necessary however generally it will be regenerated when needed
27+
#!**/packages/repositories.config
28+
29+
# MSTest test Results
30+
[Tt]est[Rr]esult*/
31+
[Bb]uild[Ll]og.*
32+
33+
*_i.c
34+
*_p.c
35+
*.ilk
36+
*.meta
37+
*.obj
38+
*.pch
39+
*.pdb
40+
*.pgc
41+
*.pgd
42+
*.rsp
43+
*.sbr
44+
*.tlb
45+
*.tli
46+
*.tlh
47+
*.tmp
48+
*.tmp_proj
49+
*.log
50+
*.vspscc
51+
*.vssscc
52+
.builds
53+
*.pidb
54+
*.log
55+
*.scc
56+
57+
# OS generated files #
58+
.DS_Store*
59+
ehthumbs.db
60+
Icon?
61+
Thumbs.db
62+
63+
# Visual C++ cache files
64+
ipch/
65+
*.aps
66+
*.ncb
67+
*.opensdf
68+
*.sdf
69+
*.cachefile
70+
71+
# Visual Studio profiler
72+
*.psess
73+
*.vsp
74+
*.vspx
75+
76+
# Guidance Automation Toolkit
77+
*.gpState
78+
79+
# ReSharper is a .NET coding add-in
80+
_ReSharper*/
81+
*.[Rr]e[Ss]harper
82+
83+
# TeamCity is a build add-in
84+
_TeamCity*
85+
86+
# DotCover is a Code Coverage Tool
87+
*.dotCover
88+
89+
# NCrunch
90+
*.ncrunch*
91+
.*crunch*.local.xml
92+
93+
# Installshield output folder
94+
[Ee]xpress/
95+
96+
# DocProject is a documentation generator add-in
97+
DocProject/buildhelp/
98+
DocProject/Help/*.HxT
99+
DocProject/Help/*.HxC
100+
DocProject/Help/*.hhc
101+
DocProject/Help/*.hhk
102+
DocProject/Help/*.hhp
103+
DocProject/Help/Html2
104+
DocProject/Help/html
105+
106+
# Click-Once directory
107+
publish/
108+
109+
# Publish Web Output
110+
*.Publish.xml
111+
112+
# Windows Azure Build Output
113+
csx
114+
*.build.csdef
115+
116+
# Windows Store app package directory
117+
AppPackages/
118+
119+
# Others
120+
sql/
121+
*.Cache
122+
ClientBin/
123+
[Ss]tyle[Cc]op.*
124+
~$*
125+
*~
126+
*.dbmdl
127+
*.[Pp]ublish.xml
128+
*.pfx
129+
*.publishsettings
130+
modulesbin/
131+
tempbin/
132+
133+
# EPiServer Site file (VPP)
134+
AppData/
135+
136+
# RIA/Silverlight projects
137+
Generated_Code/
138+
139+
# Backup & report files from converting an old project file to a newer
140+
# Visual Studio version. Backup files are not needed, because we have git ;-)
141+
_UpgradeReport_Files/
142+
Backup*/
143+
UpgradeLog*.XML
144+
UpgradeLog*.htm
145+
146+
# vim
147+
*.txt~
148+
*.swp
149+
*.swo
150+
151+
# svn
152+
.svn
153+
154+
# SQL Server files
155+
**/App_Data/*.mdf
156+
**/App_Data/*.ldf
157+
**/App_Data/*.sdf
158+
159+
160+
#LightSwitch generated files
161+
GeneratedArtifacts/
162+
_Pvt_Extensions/
163+
ModelManifest.xml
164+
165+
# =========================
166+
# Windows detritus
167+
# =========================
168+
169+
# Windows image file caches
170+
Thumbs.db
171+
ehthumbs.db
172+
173+
# Folder config file
174+
Desktop.ini
175+
176+
# Recycle Bin used on file shares
177+
$RECYCLE.BIN/
178+
179+
# Mac desktop service store files
180+
.DS_Store
181+
182+
# SASS Compiler cache
183+
.sass-cache
184+
185+
# Visual Studio 2014 CTP
186+
**/*.sln.ide

.openapi-generator-ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
# As an example, the C# client generator defines ApiClient.cs.
8+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9+
#ApiClient.cs
10+
11+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
12+
#foo/*/qux
13+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14+
15+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16+
#foo/**/qux
17+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18+
19+
# You can also negate patterns with an exclamation (!).
20+
# For example, you can ignore all files in a docs folder with the file extension .md:
21+
#docs/*.md
22+
# Then explicitly reverse the ignore rule for a single file:
23+
#!docs/README.md

.openapi-generator/VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.3.4

README.md

Lines changed: 125 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,125 @@
1-
# messente-api-csharp
2-
Messente public API libraries merged into one C# library
1+
# Messente API Library
2+
3+
- Messente API version: 1.0.0
4+
- C# package version: 1.0.0
5+
6+
[Messente](https://messente.com) is a global provider of messaging and user verification services. Use Messente API library to send and receive SMS, Viber and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups. Messente builds [tools](https://messente.com/documentation) to help organizations connect their services to people anywhere in the world.
7+
8+
## Installation
9+
10+
Install Messente API library via NuGet Package Manager or .NET CLI.
11+
12+
### Package Manager
13+
14+
`Install-Package com.Messente.Api -Version 1.0.0`
15+
16+
### .NET CLI
17+
18+
`dotnet add package com.Messente.Api --version 1.0.0`
19+
20+
## Features
21+
22+
Messente API has the following features:
23+
24+
- Omnichannel ([external docs](https://messente.com/documentation/omnichannel-api)),
25+
- Phonebook ([external docs](https://messente.com/documentation/phonebook-api)).
26+
27+
Messente API Library provides the operations described below to access the features.
28+
29+
### BlacklistApi
30+
31+
1. Adds a phone number to the blacklist. [`AddToBlacklist`](docs/BlacklistApi.md#addtoblacklist)
32+
1. Deletes a phone number from the blacklist. [`DeleteFromBlacklist`](docs/BlacklistApi.md#deletefromblacklist)
33+
1. Returns all blacklisted phone numbers. [`FetchBlacklist`](docs/BlacklistApi.md#fetchblacklist)
34+
1. Checks if a phone number is blacklisted. [`IsBlacklisted`](docs/BlacklistApi.md#isblacklisted)
35+
36+
### ContactsApi
37+
38+
1. Adds a contact to a group. [`AddContactToGroup`](docs/ContactsApi.md#addcontacttogroup)
39+
1. Creates a new contact. [`CreateContact`](docs/ContactsApi.md#createcontact)
40+
1. Deletes a contact. [`DeleteContact`](docs/ContactsApi.md#deletecontact)
41+
1. Lists a contact. [`FetchContact`](docs/ContactsApi.md#fetchcontact)
42+
1. Lists groups of a contact. [`FetchContactGroups`](docs/ContactsApi.md#fetchcontactgroups)
43+
1. Returns all contacts. [`FetchContacts`](docs/ContactsApi.md#fetchcontacts)
44+
1. Removes a contact from a group. [`RemoveContactFromGroup`](docs/ContactsApi.md#removecontactfromgroup)
45+
1. Updates a contact. [`UpdateContact`](docs/ContactsApi.md#updatecontact)
46+
47+
### DeliveryReportApi
48+
49+
1. Retrieves the delivery report for the Omnimessage. [`RetrieveDeliveryReport`](docs/DeliveryReportApi.md#retrievedeliveryreport)
50+
51+
### GroupsApi
52+
53+
1. Creates a new group with the provided name. [`CreateGroup`](docs/GroupsApi.md#creategroup)
54+
1. Deletes a group. [`DeleteGroup`](docs/GroupsApi.md#deletegroup)
55+
1. Lists a group. [`FetchGroup`](docs/GroupsApi.md#fetchgroup)
56+
1. Returns all groups. [`FetchGroups`](docs/GroupsApi.md#fetchgroups)
57+
1. Updates a group with the provided name. [`UpdateGroup`](docs/GroupsApi.md#updategroup)
58+
59+
### OmnimessageApi
60+
61+
1. Cancels a scheduled Omnimessage. [`CancelScheduledMessage`](docs/OmnimessageApi.md#cancelscheduledmessage)
62+
1. Sends an Omnimessage. [`SendOmnimessage`](docs/OmnimessageApi.md#sendomnimessage)
63+
64+
## Auth
65+
66+
**Type**: HTTP basic authentication
67+
68+
Read the [external getting-started article](https://messente.com/documentation/getting-started) which explains API keys and Sender ID logic.
69+
70+
## Getting started: sending an omnimessage
71+
72+
```cs
73+
using System;
74+
using System.Diagnostics;
75+
using System.Collections.Generic;
76+
using com.Messente.Api.Api;
77+
using com.Messente.Api.Client;
78+
using com.Messente.Api.Model;
79+
80+
namespace Example
81+
{
82+
public class SendOmniMessageExample
83+
{
84+
public static void Main()
85+
{
86+
// Configure HTTP basic authorization: basicAuth
87+
Configuration.Default.Username = "<MESSENTE_API_USERNAME>";
88+
Configuration.Default.Password = "<MESSENTE_API_PASSWORD>";
89+
90+
List<object> messages = new List<object>();
91+
var sms = new SMS(sender: "<sender number or name>", text: "Hello SMS!");
92+
var viber = new Viber(text: "Hello viber!");
93+
var whatsapp = new WhatsApp(text: new WhatsAppText(body: "Hello WhatsApp!"));
94+
messages.Add(viber);
95+
messages.Add(whatsapp);
96+
messages.Add(sms);
97+
98+
var apiInstance = new OmnimessageApi();
99+
var omnimessage = new Omnimessage(to: "<phone_number>", messages: messages);
100+
101+
try
102+
{
103+
// Sends an Omnimessage
104+
OmniMessageCreateSuccessResponse result = apiInstance.SendOmnimessage(omnimessage);
105+
Debug.WriteLine(result);
106+
}
107+
catch (Exception e)
108+
{
109+
Debug.Print("Exception when calling SendOmnimessage: " + e.Message);
110+
111+
}
112+
113+
}
114+
}
115+
}
116+
117+
```
118+
119+
## License
120+
121+
[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
122+
123+
## Terms
124+
125+
[https://messente.com/terms-and-conditions](https://messente.com/terms-and-conditions)

com.Messente.Api.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio 14
3+
VisualStudioVersion = 14.0.25420.1
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "com.Messente.Api", "src\com.Messente.Api\com.Messente.Api.csproj", "{CC8784CC-0557-4397-B0EE-36AF0775CCF0}"
6+
EndProject
7+
Global
8+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
9+
Debug|Any CPU = Debug|Any CPU
10+
Release|Any CPU = Release|Any CPU
11+
EndGlobalSection
12+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
13+
{CC8784CC-0557-4397-B0EE-36AF0775CCF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14+
{CC8784CC-0557-4397-B0EE-36AF0775CCF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
15+
{CC8784CC-0557-4397-B0EE-36AF0775CCF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
16+
{CC8784CC-0557-4397-B0EE-36AF0775CCF0}.Release|Any CPU.Build.0 = Release|Any CPU
17+
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18+
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
19+
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
20+
{19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU
21+
EndGlobalSection
22+
GlobalSection(SolutionProperties) = preSolution
23+
HideSolutionNode = FALSE
24+
EndGlobalSection
25+
EndGlobal

0 commit comments

Comments
 (0)