Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@
<groupId>com.plivo</groupId>
<artifactId>plivo-java</artifactId>
<version>5.9.2</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>
<name>plivo-java</name>
<description>A Java SDK to make voice calls &amp; send SMS using Plivo and to generate Plivo XML</description>
<licenses>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/plivo/api/PlivoClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
public class PlivoClient {

private static SimpleModule simpleModule = new SimpleModule();
protected static String BASE_URL = "https://api.plivo.com/v1/";
protected static String VOICE_BASE_URL = "https://api.plivo.com/v1/";
protected static String VOICE_FALLBACK1_URL = "https://api.plivo.com/v1/";
protected static String VOICE_FALLBACK2_URL = "https://api.plivo.com/v1/";
protected static String BASE_URL = "https://api-qa.voice.plivodev.com/v1/";
protected static String VOICE_BASE_URL = "https://api-qa.voice.plivodev.com/v1/";
protected static String VOICE_FALLBACK1_URL = "https://api-qa.voice.plivodev.com/v1/";
protected static String VOICE_FALLBACK2_URL = "https://api-qa.voice.plivodev.com/v1/";
protected static String CALLINSIGHTS_BASE_URL = "https://stats.plivo.com/v1/";
protected static String LOOKUP_BASE_URL = "https://lookup.plivo.com/v1/";
private static String version = "Unknown Version";
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/com/plivo/examples/makeCall.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.plivo.examples;

import java.io.IOException;
import com.plivo.api.Plivo;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.application.Application;
import com.plivo.api.models.application.ApplicationCreateResponse;

/**
* Example for Application create
*/
class ApplicationCreate {
public static void main(String [] args) {
Plivo.init("MADCHANDRESH02TANK06","OTljNmVmOGVkNGZhNjJlOWIyMWM0ZDI0ZjQwZDdk");
try {
ApplicationCreateResponse response = Application.creator("AjayTesting1")
.create();

System.out.println(response);
} catch (PlivoRestException | IOException e) {
e.printStackTrace();
}
}
}
2 changes: 1 addition & 1 deletion src/test/java/com/plivo/api/BaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected void assertRequest(String method, String format, Map<String, String> p
}

protected void assertRequestWithPayload(String method, String format, Map<String, Object> payload, Object... objects)
throws InterruptedException, UnsupportedEncodingException, JsonProcessingException {
throws InterruptedException, IOException {
RecordedRequest recordedRequest = server.takeRequest();
JsonNode expectedPayload = mapper.valueToTree(payload);
JsonNode actualPayload = mapper.readTree(recordedRequest.getBody().readUtf8());
Expand Down