telapi-java

Java helper library for Telapi REST services

License

License

Categories

Categories

Java Languages
GroupId

GroupId

com.telapi.api
ArtifactId

ArtifactId

telapi-java
Last Version

Last Version

0.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

telapi-java
Java helper library for Telapi REST services
Source Code Management

Source Code Management

https://github.com/TelAPI/telapi-java

Download telapi-java

How to add to project

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

Dependencies

compile (4)

Group / Artifact Type Version
org.jboss.resteasy : resteasy-jaxrs jar 2.3.4.Final
org.jboss.resteasy : resteasy-jackson-provider jar 2.3.4.Final
log4j : log4j jar 1.2.17
com.thoughtworks.xstream : xstream jar 1.4.3

test (1)

Group / Artifact Type Version
junit : junit jar 4.10

Project Modules

There are no modules declared in this project.

PLEASE NOTE THAT THIS LIBRARY IS NOT ACTIVELY MAINTAINED BY TELAPI

telapi-java

This java library is an open source tool built to simplify interaction with the TelAPI telephony platform. TelAPI makes adding voice and SMS to applications fun and easy.

For more information about TelAPI, please visit: telapi.com/features or telapi.com/docs

See http://telapi.github.com/telapi-java/apidocs/ for documentation on all methods available with this library.


Installation

To use this library, include the following dependency:

<dependency>
  <groupId>com.telapi.api</groupId>
  <artifactId>telapi-java</artifactId>
  <version>0.0.1</version>
</dependency>

Or clone the repo, and install via maven:

$ git clone [email protected]:TelAPI/telapi-java.git
$ cd telapi-java
$ mvn install

Usage

REST

TelAPI REST API documenatation

Send SMS Example
package com.telapi.api.example;
 
import com.telapi.api.TelapiConnector;
import com.telapi.api.configuration.BasicTelapiConfiguration;
import com.telapi.api.domain.SmsMessage;
import com.telapi.api.exceptions.TelapiException;
 
public class SendSmsExample {
    public static void main(String[] args) {
        BasicTelapiConfiguration conf = new BasicTelapiConfiguration();
        conf.setSid("********************************");
        conf.setAuthToken("********************************");
        TelapiConnector conn = new TelapiConnector(conf);
 
        try {
            SmsMessage smsMessage = conn.sendSmsMessage(
                "(XXX) XXX-XXXX",
                "(XXX) XXX-XXXX",
                "This is an SMS message sent from the TelAPI Java helper! Easy as 1, 2, 3!",
                null
            );
            System.out.println(smsMessage.getSid());
        } catch (TelapiException e) {
            e.printStackTrace();
        }
    }
}         

InboundXML

InboundXML is an XML dialect which enables you to control phone call flow. For more information please visit the TelAPI InboundXML documenatation

Example
package com.telapi.api.inboundxml.example;
 
import com.telapi.api.inboundxml.elements.Response;
import com.telapi.api.inboundxml.elements.enums.Voice;
 
public class SayExample {
 
public static void main(String[] args) {
 
    Response.create()
        .say("Welcome to TelAPI. This is a sample InboundXML document.", Voice.MAN)
        .createXml();
 
    }
 
}   

will render

<?xml version="1.0" encoding="UTF-8"?>
<Response>
  <Say voice="man">Welcome to TelAPI. This is a sample InboundXML document.</Say>
</Response>

com.telapi.api

Versions

Version
0.0.1