Skip to content

Commit

Permalink
Merge pull request #204 from plivo/VT-3868
Browse files Browse the repository at this point in the history
VT-3868
  • Loading branch information
huzaif-plivo authored Feb 2, 2022
2 parents df5dfcc + e536e44 commit 6e3d50a
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 28 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.9.0](https://github.com/plivo/plivo-java/tree/v5.9.0) (2022-02-02)
**Features - MPCCallRecording**
- Parameter change from statusCall to recordingCallback

## [5.8.0](https://github.com/plivo/plivo-java/tree/v5.8.0) (2022-01-05)
**Features - Generic**
- Default log level set to 'NONE'
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ 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.8.0</version>
<version>5.9.0</version>
</dependency>
```

If you are using Gradle, use the following line in your dependencies.
```
compile 'com.plivo:plivo-java:5.8.0'
compile 'com.plivo:plivo-java:5.9.0'
```

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

version=5.8.0
version=5.9.0
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.3.0</version>
<version>5.9.0</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
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public class MultiPartyCallParticipantRecordingStart extends VoiceUpdater<MultiP
@OneOf(message = "should be one of [mp3, wav]", options = {"mp3", "wav"})
private String fileFormat = "mp3";
@UrlValues
private String statusCallbackUrl;
private String recordingCallbackUrl;
@OneOf(message = "should be one of [GET, POST]", options = {"GET", "POST"})
private String statusCallbackMethod = "POST";
private String recordingCallbackMethod = "POST";

public MultiPartyCallParticipantRecordingStart(String mpcId, String secondaryId) {
super(mpcId, secondaryId);
Expand All @@ -24,26 +24,26 @@ public String fileFormat() {
return fileFormat;
}

public String statusCallbackUrl() {
return statusCallbackUrl;
public String recordingCallbackUrl() {
return recordingCallbackUrl;
}

public String statusCallbackMethod() {
return statusCallbackMethod;
public String recordingCallbackMethod() {
return recordingCallbackMethod;
}

public MultiPartyCallParticipantRecordingStart fileFormat(String fileFormat) {
this.fileFormat = fileFormat;
return this;
}

public MultiPartyCallParticipantRecordingStart statusCallbackUrl(String statusCallbackUrl) {
this.statusCallbackUrl = statusCallbackUrl;
public MultiPartyCallParticipantRecordingStart recordingCallbackUrl(String recordingCallbackUrl) {
this.recordingCallbackUrl = recordingCallbackUrl;
return this;
}

public MultiPartyCallParticipantRecordingStart statusCallbackMethod(String statusCallbackMethod) {
this.statusCallbackMethod = statusCallbackMethod;
public MultiPartyCallParticipantRecordingStart recordingCallbackMethod(String recordingCallbackMethod) {
this.recordingCallbackMethod = recordingCallbackMethod;
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public class MultiPartyCallRecordingStart extends VoiceUpdater<MultiPartyCallRec
@OneOf(message = "should be one of [mp3, wav]", options = {"mp3", "wav"})
private String fileFormat = "mp3";
@UrlValues
private String statusCallbackUrl;
private String recordingCallbackUrl;
@OneOf(message = "should be one of [GET, POST]", options = {"GET", "POST"})
private String statusCallbackMethod = "POST";
private String recordingCallbackMethod = "POST";

public MultiPartyCallRecordingStart(String mpcId) {
super(mpcId);
Expand All @@ -24,26 +24,26 @@ public String fileFormat() {
return fileFormat;
}

public String statusCallbackUrl() {
return statusCallbackUrl;
public String recordingCallbackUrl() {
return recordingCallbackUrl;
}

public String statusCallbackMethod() {
return statusCallbackMethod;
public String recordingCallbackMethod() {
return recordingCallbackMethod;
}

public MultiPartyCallRecordingStart fileFormat(String fileFormat) {
this.fileFormat = fileFormat;
return this;
}

public MultiPartyCallRecordingStart statusCallbackUrl(String statusCallbackUrl) {
this.statusCallbackUrl = statusCallbackUrl;
public MultiPartyCallRecordingStart recordingCallbackUrl(String recordingCallbackUrl) {
this.recordingCallbackUrl = recordingCallbackUrl;
return this;
}

public MultiPartyCallRecordingStart statusCallbackMethod(String statusCallbackMethod) {
this.statusCallbackMethod = statusCallbackMethod;
public MultiPartyCallRecordingStart recordingCallbackMethod(String recordingCallbackMethod) {
this.recordingCallbackMethod = recordingCallbackMethod;
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static void main(String[] args) throws IOException, PlivoRestException, P

// 1. either by using static recordStarter() method of MultiPartyCall class
MultiPartyCallRecordingStart recordingStart1 = MultiPartyCall.recordStarter(MultiPartyCallUtils.friendlyName("myMPC1"));
MultiPartyCallRecordingStartResponse resp1 = recordingStart1.fileFormat("wav").statusCallbackUrl("http://status/recording/").update();
MultiPartyCallRecordingStartResponse resp1 = recordingStart1.fileFormat("wav").recordingCallbackUrl("http://status/recording/").update();
System.out.println(resp1.getRecordingUrl());
System.out.println(resp1.getRecordingId());

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.8.0
5.9.0
4 changes: 2 additions & 2 deletions src/test/java/com/plivo/api/MPCTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void startRecording() throws Exception {
final String mpcName = "myMpc";
Map<String, Object> expectedPayload = new LinkedHashMap<>();
expectedPayload.put("file_format", "mp3");
expectedPayload.put("status_callback_method", "POST");
expectedPayload.put("recording_callback_method", "POST");

MultiPartyCall.recordStarter(MultiPartyCallUtils.friendlyName(mpcName)).update();
assertRequestWithPayload("POST", "MultiPartyCall/name_%s/Record/", expectedPayload, mpcName);
Expand Down Expand Up @@ -211,7 +211,7 @@ public void startParticipantRecording() throws Exception {
final String participantId = "10";
Map<String, Object> expectedPayload = new LinkedHashMap<>();
expectedPayload.put("file_format", "mp3");
expectedPayload.put("status_callback_method", "POST");
expectedPayload.put("recording_callback_method", "POST");

MultiPartyCall.participantRecordStarter(MultiPartyCallUtils.friendlyName(mpcName), participantId).update();
assertRequestWithPayload("POST", "MultiPartyCall/name_%s/Participant/%s/Record/", expectedPayload, mpcName, participantId);
Expand Down

0 comments on commit 6e3d50a

Please sign in to comment.