CMC Java REST API library

Java library for communicating with the Cloud Messaging Center (CMC) REST API

License

License

Categories

Categories

Java Languages
GroupId

GroupId

com.telecomsys.cmc
ArtifactId

ArtifactId

cmc-java
Last Version

Last Version

1.3.0
Release Date

Release Date

Type

Type

jar
Description

Description

CMC Java REST API library
Java library for communicating with the Cloud Messaging Center (CMC) REST API
Source Code Management

Source Code Management

http://github.com/cloudmessagingcenter/cmc-java

Download cmc-java

How to add to project

<!-- https://jarcasting.com/artifacts/com.telecomsys.cmc/cmc-java/ -->
<dependency>
    <groupId>com.telecomsys.cmc</groupId>
    <artifactId>cmc-java</artifactId>
    <version>1.3.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.telecomsys.cmc/cmc-java/
implementation 'com.telecomsys.cmc:cmc-java:1.3.0'
// https://jarcasting.com/artifacts/com.telecomsys.cmc/cmc-java/
implementation ("com.telecomsys.cmc:cmc-java:1.3.0")
'com.telecomsys.cmc:cmc-java:jar:1.3.0'
<dependency org="com.telecomsys.cmc" name="cmc-java" rev="1.3.0">
  <artifact name="cmc-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.telecomsys.cmc', module='cmc-java', version='1.3.0')
)
libraryDependencies += "com.telecomsys.cmc" % "cmc-java" % "1.3.0"
[com.telecomsys.cmc/cmc-java "1.3.0"]

Dependencies

compile (4)

Group / Artifact Type Version
org.apache.httpcomponents : httpclient jar 4.4.1
org.slf4j : slf4j-api jar 1.7.12
com.fasterxml.jackson.core : jackson-core jar 2.5.4
com.fasterxml.jackson.core : jackson-databind jar 2.5.4

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
com.github.tomakehurst : wiremock jar 1.57

Project Modules

There are no modules declared in this project.

CMC REST API Java SDK Build Status

Java library for communicating with the Cloud Messaging Center (CMC) REST API.

You can sign up for a Cloud Messaging Center (CMC) REST API account at https://www.cloudmessagingcenter.com/signup/cmcsignup/.

Prerequisites:

Java 1.7 and later.

Installation

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.telecomsys.cmc</groupId>
  <artifactId>cmc-java</artifactId>
  <version>1.3.0</version>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.telecomsys.cmc:cmc-java:1.3.0"

ProGuard

If you're planning on using ProGuard, make sure that you exclude the CMC bindings. You can do this by adding the following to your proguard.cfg file:

-keep class com.telecomsys.cmc.** { *; }

API Usage

REST URL for trial: https://www.comtechcmc-trial.com/rest/v1

REST URL for production: https://www.cloudmessagingcenter.com/rest/v1

  • Import the classes into your code. For example,
import com.telecomsys.cmc.*;

To send a message:

  • Create the API end point using the REST URL and the account ID (ACCOUNTID) and authentication token (AUTHTOKEN) you receive in the REST sign-up email. For example to create the messaging end point for trial:
MessagingApi messagingApi = new MessagingApi("https://www.comtechcmc-trial.com/rest/v1", ACCOUNTID, AUTHTOKEN);
  • Send the message to the destinations using the REST keyword (KEYWORD) receive in the REST sign-up email.
List<String> destinations = new ArrayList<String>();
destinations.add(deviceNumber);
Message message = new Message(destinations, KEYWORD, "Test message");
HttpResponseWrapper<NotificationsResponse> sendMsgResponse = messagingApi.sendMessage(message);
com.telecomsys.cmc

Cloud Messaging Center (CMC)

Versions

Version
1.3.0
1.2.0
1.1.1
1.1.0
1.0.0