Vivial Connect Java SDK

Java Client Library for Vivial Connect

License

License

Categories

Categories

Java Languages Net
GroupId

GroupId

net.vivialconnect
ArtifactId

ArtifactId

vivialconnect-java
Last Version

Last Version

0.1.7
Release Date

Release Date

Type

Type

jar
Description

Description

Vivial Connect Java SDK
Java Client Library for Vivial Connect
Project URL

Project URL

https://www.vivialconnect.net
Source Code Management

Source Code Management

https://github.com/vivialconnect/vivialconnect-java

Download vivialconnect-java

How to add to project

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

Dependencies

compile (4)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-databind jar 2.10.0.pr1
com.fasterxml.jackson.core : jackson-annotations jar 2.10.0.pr1
com.fasterxml.jackson.core : jackson-core jar 2.10.0.pr1
com.sun.jersey : jersey-bundle jar 1.8

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.apache.directory.studio : org.apache.commons.io jar 2.4
org.hamcrest : hamcrest-library jar 1.3

Project Modules

There are no modules declared in this project.

VivialConnect Client for Java

VivialConnect is a simple SMS/MMS API. It's designed specifically for developers seeking a simple, affordable and scalable messaging solution.

Get your API key here: https://www.vivialconnect.net/register
Be sure to read the API documentation: https://docs.vivialconnect.net

Requirements

Maven Installation

Include the following dependency into your pom.xml:

<dependency>
  <groupId>vivialconnect</groupId>
  <artifactId>vivialconnect-java</artifactId>
  <version>0.1.6</version>
</dependency>

Manual Installation

You can clone the VivialConnect Java client repository into your project:

git clone https://github.com/VivialConnect/vivialconnect-java

Examples

Initialize Client: Needed before attempting to use any resource.

VivialConnectClient.init(123456, my-api-key, my-api-secret);

(optional) Set Proxy: If you need to setup a proxy:

Proxy proxy = new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("127.0.0.1", 9000));
VivialConnectClient.setProxy(proxy);

Search for and buying a number:

List<AvailableNumber> availableNumbers = Number.findAvailableNumbersByAreaCode("302");
AvailableNumber availableNumber = availableNumbers.get(0);
AssociatedNumber associatedNumber = availableNumber.buy();

Send a text message:

Message message = new Message();
message.setFromNumber("+19132597591");
message.setToNumber("+11234567890");
message.setBody("Hello, from Vivial Connect!");
message.send(); 

Retrieve a list of all messages sent:

Message.getMessages();

Get a specific message by ID:

Message message = Message.getMessageById(86962);

Query Parameters

qParams are managed by this library using a Map<String, String>. Every resource that supports query parameters will have an overload method that takes a Map.

Retrieve a list of the 5 most recent messages:

Map<String, String> queryParams = new HashMap<String, String>();
queryParams.put("order", "sent desc");
queryParams.put("limit", "5");
List<Message> messages = Message.getMessages(queryParams);

Retrieve a 2 available numbers from US area code 302:

Map<String, String> queryParams = new HashMap<String, String>();
queryParams.put("limit", "2");
List<AvailableNumber> availableNumbers = Number.findAvailableNumbersByAreaCode("302", queryParams);
net.vivialconnect

Vivial Connect

Versions

Version
0.1.7
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2
0.1.0