Skip to content

Commit

Permalink
Merge pull request #267 from plivo/VT-7039
Browse files Browse the repository at this point in the history
newParamAddedInSpeakApi
  • Loading branch information
eniyavan-muruganantham-plivo authored Jan 8, 2024
2 parents d9356f3 + cc12289 commit a393abe
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## [5.38.1](https://github.com/plivo/plivo-java/tree/v5.38.1) (2023-12-19)
**Feature - Added params for Speak API**
- Added params 'type' for Speak APIs

## [5.38.0](https://github.com/plivo/plivo-java/tree/v5.38.0) (2023-11-30)
**Feature - Added params for GET and LIST Campaign API**
- Added params 'vertical', 'campaign_alias' for GET and LIST Campaign APIs
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ If you are using Maven, use the following XML to include the Plivo SDK as a depe
<dependency>
<groupId>com.plivo</groupId>
<artifactId>plivo-java</artifactId>
<version>5.38.0</version>
<version>5.38.1</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion pom.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Written manually.

version=5.38.0
version=5.38.1
groupId=com.plivo
artifactId=plivo-java

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.plivo</groupId>
<artifactId>plivo-java</artifactId>
<version>5.38.0</version>
<version>5.38.1</version>
<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
4 changes: 4 additions & 0 deletions src/main/java/com/plivo/api/models/call/Call.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ public static CallSpeakCreator speaker(String callUuid, String text) {
return new CallSpeakCreator(callUuid, text);
}

public static CallSpeakCreator speaker(String callUuid, String text, String type) {
return new CallSpeakCreator(callUuid, text, type);
}

public static CallSpeakDeleter speakStopper(String callUuid) {
return new CallSpeakDeleter(callUuid);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class CallSpeakCreator extends VoiceCreator<CallSpeakCreateResponse> {

private final String id;
private final String text;
private final String type;
private String voice;
private String language;
private LegSpecifier legs;
Expand All @@ -20,6 +21,13 @@ public class CallSpeakCreator extends VoiceCreator<CallSpeakCreateResponse> {
public CallSpeakCreator(String id, String text) {
this.id = id;
this.text = text;
this.type = "text";
}

public CallSpeakCreator(String id, String text, String type) {
this.id = id;
this.text = text;
this.type = type;
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/com/plivo/api/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.38.0
5.38.1
4 changes: 2 additions & 2 deletions src/test/java/com/plivo/api/CallTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ public void callSpeakCreateShouldWork() throws Exception {
expectResponse("liveCallSpeakCreateResponse.json", 202);
final String callId = "callId";

Call.speaker(callId, "test")
Call.speaker(callId, "test", "text")
.speak();

assertRequest("POST", "Call/%s/Speak/", callId);
Expand All @@ -356,7 +356,7 @@ public void callSpeakCreateWithClientShouldWork() throws Exception {
expectResponse("liveCallSpeakCreateResponse.json", 202);
final String callId = "callId";

Call.speaker(callId, "test")
Call.speaker(callId, "test", "text")
.client(client)
.speak();

Expand Down

0 comments on commit a393abe

Please sign in to comment.