Swisscom SMS-API-Client

A Java library for easy use of the Swisscom SMS API in Java

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

be.rufer.swisscom.sms
ArtifactId

ArtifactId

api-client
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

Swisscom SMS-API-Client
A Java library for easy use of the Swisscom SMS API in Java
Project URL

Project URL

https://github.com/rufer7/swisscom-sms-api-client
Source Code Management

Source Code Management

https://github.com/rufer7/swisscom-sms-api-client

Download api-client

How to add to project

<!-- https://jarcasting.com/artifacts/be.rufer.swisscom.sms/api-client/ -->
<dependency>
    <groupId>be.rufer.swisscom.sms</groupId>
    <artifactId>api-client</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/be.rufer.swisscom.sms/api-client/
implementation 'be.rufer.swisscom.sms:api-client:1.0'
// https://jarcasting.com/artifacts/be.rufer.swisscom.sms/api-client/
implementation ("be.rufer.swisscom.sms:api-client:1.0")
'be.rufer.swisscom.sms:api-client:jar:1.0'
<dependency org="be.rufer.swisscom.sms" name="api-client" rev="1.0">
  <artifact name="api-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='be.rufer.swisscom.sms', module='api-client', version='1.0')
)
libraryDependencies += "be.rufer.swisscom.sms" % "api-client" % "1.0"
[be.rufer.swisscom.sms/api-client "1.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.springframework : spring-web jar 4.1.3.RELEASE
com.fasterxml.jackson.core : jackson-databind jar 2.4.4

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-all jar 1.8.4

Project Modules

There are no modules declared in this project.

Swisscom SMS-API-Client

Build Status Coverage Status License Releases Maven Central

A Java library for easy use of the Swisscom SMS API in Java. The SMS-API of Swisscom is published and documented at the Swisscom Developer Portal.

How to use

To use the API with this client you have to register at the Swisscom developer portal and create an API-Key.

Maven dependency

<dependency>
    <groupId>be.rufer.swisscom.sms</groupId>
    <artifactId>api-client</artifactId>
    <version>1.0</version>
</dependency>

Example code snippet

The following code snippet shows how to use the Swisscom API-Client

import be.rufer.swisscom.sms.api.client.SwisscomSmsSender;
import be.rufer.swisscom.sms.api.domain.CommunicationWrapper;

public class SmsSenderExample
{
    public static void main( String[] args )
    {
      // SENDER_NUMBER and RECEIVER_NUMBER1 in the following format: +41791234567
      SwisscomSmsSender smsSender = new SwisscomSmsSender("API_KEY", "SENDER_NUMBER");
      CommunicationWrapper response = smsSender.sendSms("MESSAGE", "RECEIVER_NUMBER1");
      // Sending a SMS to several receivers
      CommunicationWrapper response2 = smsSender.sendSms("MESSAGE", "RECEIVER_NUMBER1", "RECEIVER_NUMBER2");
    }
}

Release

For releasing consider the maven central manual

Versions

Version
1.0