-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #195 from plivo/VT-3664
VT-3664 MPC Enhancements for Java SDK
- Loading branch information
Showing
15 changed files
with
790 additions
and
493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Written manually. | ||
|
||
version=5.4.1 | ||
version=5.5.0 | ||
groupId=com.plivo | ||
artifactId=plivo-java |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/main/java/com/plivo/api/models/multipartycall/MultiPartyCallStartPlayAudio.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.plivo.api.models.multipartycall; | ||
|
||
import com.plivo.api.exceptions.PlivoValidationException; | ||
import com.plivo.api.models.base.VoiceUpdater; | ||
import com.plivo.api.validators.UrlValues; | ||
import com.plivo.api.validators.Validate; | ||
import retrofit2.Call; | ||
|
||
public class MultiPartyCallStartPlayAudio extends VoiceUpdater<MultiPartyCallStartPlayAudioResponse> { | ||
|
||
@UrlValues | ||
private String url; | ||
|
||
public MultiPartyCallStartPlayAudio(String mpcId, String secondaryId) { | ||
super(mpcId, secondaryId); | ||
} | ||
|
||
@Override | ||
protected Call<MultiPartyCallStartPlayAudioResponse> obtainCall() throws PlivoValidationException { | ||
MultiPartyCallUtils.validMultiPartyCallId(id); | ||
Validate.check(this); | ||
return client().getVoiceApiService().mpcStartPlayAudio(client().getAuthId(), id, secondaryId, this); | ||
} | ||
|
||
@Override | ||
protected Call<MultiPartyCallStartPlayAudioResponse> obtainFallback1Call() throws PlivoValidationException { | ||
MultiPartyCallUtils.validMultiPartyCallId(id); | ||
Validate.check(this); | ||
return client().getVoiceFallback1Service().mpcStartPlayAudio(client().getAuthId(), id, secondaryId, this); | ||
} | ||
|
||
@Override | ||
protected Call<MultiPartyCallStartPlayAudioResponse> obtainFallback2Call() throws PlivoValidationException { | ||
MultiPartyCallUtils.validMultiPartyCallId(id); | ||
Validate.check(this); | ||
return client().getVoiceFallback1Service().mpcStartPlayAudio(client().getAuthId(), id, secondaryId, this); | ||
} | ||
|
||
public String url() { | ||
return url; | ||
} | ||
|
||
public MultiPartyCallStartPlayAudio url(String url) { | ||
this.url = url; | ||
return this; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/com/plivo/api/models/multipartycall/MultiPartyCallStartPlayAudioResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.plivo.api.models.multipartycall; | ||
|
||
import com.plivo.api.models.base.BaseResponse; | ||
|
||
import java.util.List; | ||
|
||
public class MultiPartyCallStartPlayAudioResponse extends BaseResponse { | ||
|
||
private List<String> mpcMemberId; | ||
private String mpcName; | ||
|
||
public List<String> getMpcMemberId() { | ||
return mpcMemberId; | ||
} | ||
public String mpcName() { | ||
return mpcName; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/main/java/com/plivo/api/models/multipartycall/MultiPartyCallStopPlayAudio.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.plivo.api.models.multipartycall; | ||
|
||
import com.plivo.api.exceptions.PlivoValidationException; | ||
import com.plivo.api.models.base.VoiceDeleter; | ||
import com.plivo.api.validators.Validate; | ||
import okhttp3.ResponseBody; | ||
import retrofit2.Call; | ||
|
||
public class MultiPartyCallStopPlayAudio extends VoiceDeleter<MultiPartyCallParticipant> { | ||
public MultiPartyCallStopPlayAudio(String id, String secondaryId) { | ||
super(id, secondaryId); | ||
} | ||
|
||
@Override | ||
protected Call<ResponseBody> obtainCall() throws PlivoValidationException { | ||
MultiPartyCallUtils.validMultiPartyCallId(id); | ||
Validate.check(this); | ||
return client().getVoiceApiService().mpcStopPlayAudio(client().getAuthId(), id, secondaryId); | ||
} | ||
|
||
@Override | ||
protected Call<ResponseBody> obtainFallback1Call() throws PlivoValidationException { | ||
MultiPartyCallUtils.validMultiPartyCallId(id); | ||
Validate.check(this); | ||
return client().getVoiceFallback1Service().mpcStopPlayAudio(client().getAuthId(), id, secondaryId); | ||
} | ||
|
||
@Override | ||
protected Call<ResponseBody> obtainFallback2Call() throws PlivoValidationException { | ||
MultiPartyCallUtils.validMultiPartyCallId(id); | ||
Validate.check(this); | ||
return client().getVoiceFallback2Service().mpcStopPlayAudio(client().getAuthId(), id, secondaryId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5.4.1 | ||
5.5.0 |
Oops, something went wrong.