voximplant-apiclient

Voximplant Java API client library. Voximplant is a cloud communications platform for business and developers

Лицензия

Лицензия

Категории

Категории

Ant Компиляция и сборка CLI Взаимодействие с пользователем
Группа

Группа

com.voximplant
Идентификатор

Идентификатор

apiclient
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

voximplant-apiclient
Voximplant Java API client library. Voximplant is a cloud communications platform for business and developers
Ссылка на сайт

Ссылка на сайт

https://github.com/voximplant/apiclient-java
Система контроля версий

Система контроля версий

https://github.com/voximplant/apiclient-java

Скачать apiclient

Как подключить последнюю версию

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

Зависимости

compile (3)

Идентификатор библиотеки Тип Версия
com.fasterxml.jackson.core : jackson-databind jar 2.11.1
io.jsonwebtoken : jjwt-api jar 0.11.2
org.apache.httpcomponents : fluent-hc jar 4.5.12

runtime (2)

Идентификатор библиотеки Тип Версия
io.jsonwebtoken : jjwt-impl jar 0.11.2
io.jsonwebtoken : jjwt-jackson jar 0.11.2

Модули Проекта

Данный проект не имеет модулей.

Voximplant API client library

Version 1.0

Prerequisites

In order to use the Voximplant Java SDK, you need the following:

  1. A developer account. If you don't have one, sign up here.
  2. A private API key. There are 2 options to obtain it:
    1. Either generate it in the Voximplant Control panel
    2. Or call the CreateKey HTTP API method with the specified authentication parameters. You'll receive a response with the result field in it. Save the result value in a file (since we don't store the keys, save it securely on your side).
  3. JDK 8 and above

How to use

Setup a maven dependency for your project:

        <dependency>
            <groupId>org.voximplant</groupId>
            <artifactId>apiclient</artifactId>
            <version>1.0.1</version>
        </dependency>

Next, specify the path to the JSON service account file in the constructor.

VoximplantAPIClient api = new VoximplantAPIClient("/path/to/credentials.json");

Examples

Get a call history item

VoximplantAPIClient api = new VoximplantAPIClient("/path/to/credentials.json");

SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");

GetCallHistoryResponse callHistory = api.getCallHistory(new GetCallHistoryRequest()
                .setFromDate(df.parse("2020-09-01"))
                .setToDate(df.parse("2020-10-01"))
                .setCount(1));
                
CallSessionInfoType[] callSessions = callHistory.getResult();
if (callSessions.length == 1) {
    CallSessionInfoType result = callSessions[0];
}

Send an SMS

VoximplantAPIClient api = new VoximplantAPIClient("/path/to/credentials.json");

SendSmsMessageResponse sendSmsMessageResponse = api.sendSmsMessage(new SendSmsMessageRequest()
                .setSource("447443332211")
                .setDestination("447443332212")
                .setSmsBody("Test message"));

if (sendSmsMessageResponse.hasResult()) {
    long result = sendSmsMessageResponse.getResult();
} else {
    throw new IllegalArgumentException(sendSmsMessageResponse.getError().getMsg());
}
com.voximplant

Voximplant

Future-proof Cloud Communications Made Easier

Версии библиотеки

Версия
1.0.1
1.0.0