Skip to content

PuzzelSolutions/smsgw-client-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

smsgw-client-java

Build Status Coverage Status Maven Central Codacy coverage

This Java library contains some convenience APIs that lets you connect to the Intelecom SMS Gateway. Alternatively, you could integrate directly with one of the interfaces yourself.

The library consist of two parts: One client builder and builders to create a request.

The client implementation uses the JAX-RS 2.0 Client interface. Therefore, you need to run it in a JAX-RS 2.0 J2EE compliant container or provide a JAX-RS 2.0 implementation yourself (e.g. Jersey).

Installation

Maven

<dependency>
	<groupId>com.intele.chimera</groupId>
	<artifactId>smsgw-client-java</artifactId>
	<version>1.0.0</version>
</dependency>

Gradle

compile "com.intele.chimera:smsgw-client-java:1.0.0"

Examples

Standalone

try(GatewayClient gatewayClient = new GatewayClientBuilder().build()) 
	GatewayRequest gatewayRequest = new GatewayRequest.Builder(100, "username", "password").build();
	gatewayRequest.addMessage(
			new Sms.Builder("+4741000000", "Test message").withPrice(0).build());
	Response response = gatewayClient.send(gatewayRequest);

	System.out.println(response.getMessageStatus().get(0).getStatusCode());
	System.out.println(response.getMessageStatus().get(0).getStatusMessage());
	System.out.println(response.getMessageStatus().get(0).getMessageId());
} catch(Exception e) {
	e.printStackTrace();
}

About

Java client library for the Puzzel SMS Gateway

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages