Skip to content

Latest commit

 

History

History
65 lines (42 loc) · 2.68 KB

File metadata and controls

65 lines (42 loc) · 2.68 KB

Introduction

The Persephony Java SDK will allow you to easily use the Persephony API in a Java application.

Release Build Status Maintainability Test Coverage Docs

SDK Installation

To include the SDK in your build, follow the instructions on Jitpack

Testing your Installation

Test the SDK is working by sending yourself a text message.

public class Example {

    public static final String accountId = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String authToken = "your_auth_token";
    public static final String To = "your_phone_number";
    public static final String From = "a_persephony_phone_number_in_your_account";

    public static void main(String[] args) throws PersyException {
        PersyClient client = new PersyClient(accountId, authToken);

        client.messages.create(From, To, "Welcome to Persephony!");
    }
}

When you run this code you should get a text message.

Running Unit Tests

You can run gradle test to run the full test suite.

You can also specify cucumber tags with the usual boolean inclusion / exclusion, specific feature files, or the line of the scenario or scenario outline example to run.

gradle -Dcucumber.options=src/test/resources/com/vailsys/persephony/api/call/Call.feature:5 test
gradle -Dcucumber.options="--tags @Calls" test

You can generate a Cobertura coverage report by running gradle cobertura. The report will be found at build/cobertura.

Documentation

The Persephony documentation has guides on getting started with Persephony, as well as the API reference, PerCL reference, and several useful tutorials..

Getting Help

If you are experiencing difficulties, contact our support team at support@persephony.com.

Dependencies

This SDK targets Java 7.

Import these dependencies:

  • com.google.code.gson:gson:2.6.2