Skip to content

Commit

Permalink
pr review fix (#22125)
Browse files Browse the repository at this point in the history
* pr review fix

* pr review fix
  • Loading branch information
arifsaikat-microsoft authored Jun 7, 2021
1 parent b15af1a commit 05e309c
Show file tree
Hide file tree
Showing 13 changed files with 155 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Once you initialized a `CallClient` class, you can do the following chat operati
String endpoint = "https://<RESOURCE_NAME>.communcationservices.azure.com";

// Your connectionString retrieved from your Azure Communication Service
String connectionString = "https://<resource-name>.communication.azure.com/;<access-key>";
String connectionString = "endpoint=https://<resource-name>.communication.azure.com/;accesskey=<access-key>";

// Initialize the call client
final CallClientBuilder builder = new CallClientBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import com.azure.communication.callingserver.implementation.AzureCommunicationCallingServerServiceImpl;
import com.azure.communication.callingserver.implementation.CallsImpl;
import com.azure.communication.callingserver.implementation.converters.CommunicationIdentifierConverter;
import com.azure.communication.callingserver.implementation.converters.InviteParticipantsConverter;
import com.azure.communication.callingserver.implementation.converters.AddParticipantConverter;
import com.azure.communication.callingserver.implementation.converters.PlayAudioConverter;
import com.azure.communication.callingserver.implementation.models.PhoneNumberIdentifierModel;
import com.azure.communication.callingserver.implementation.models.PlayAudioRequest;
Expand Down Expand Up @@ -116,7 +116,9 @@ Mono<Response<CreateCallResponse>> createCallWithResponse(CommunicationIdentifie
* Play audio in a call.
*
* @param callId The call id.
* @param audioFileUri The media resource uri of the play audio request.
* @param audioFileUri The media resource uri of the play audio request. Currently only Wave file (.wav) format
* audio prompts are supported. More specifically, the audio content in the wave file must
* be mono (single-channel), 16-bit samples with a 16,000 (16KHz) sampling rate.
* @param loop The flag indicating whether audio file needs to be played in loop or not.
* @param audioFileId An id for the media in the AudioFileUri, using which we cache the media.
* @param callbackUri call back uri to receive notifications.
Expand Down Expand Up @@ -145,7 +147,9 @@ public Mono<PlayAudioResponse> playAudio(String callId,
* Play audio in a call.
*
* @param callId The call id.
* @param audioFileUri The media resource uri of the play audio request.
* @param audioFileUri The media resource uri of the play audio request. Currently only Wave file (.wav) format
* audio prompts are supported. More specifically, the audio content in the wave file must
* be mono (single-channel), 16-bit samples with a 16,000 (16KHz) sampling rate.
* @param playAudioOptions Options for play audio.
* @return the response payload for play audio operation.
*/
Expand Down Expand Up @@ -180,7 +184,9 @@ Mono<PlayAudioResponse> playAudio(String callId, PlayAudioRequest playAudioReque
* Play audio in a call.
*
* @param callId The call id.
* @param audioFileUri The media resource uri of the play audio request.
* @param audioFileUri The media resource uri of the play audio request. Currently only Wave file (.wav) format
* audio prompts are supported. More specifically, the audio content in the wave file must
* be mono (single-channel), 16-bit samples with a 16,000 (16KHz) sampling rate.
* @param loop The flag indicating whether audio file needs to be played in loop or not.
* @param audioFileId An id for the media in the AudioFileUri, using which we cache the media.
* @param callbackUri call back uri to receive notifications.
Expand All @@ -203,7 +209,9 @@ public Mono<Response<PlayAudioResponse>> playAudioWithResponse(String callId,
* Play audio in a call.
*
* @param callId The call id.
* @param audioFileUri The media resource uri of the play audio request.
* @param audioFileUri The media resource uri of the play audio request. Currently only Wave file (.wav) format
* audio prompts are supported. More specifically, the audio content in the wave file must
* be mono (single-channel), 16-bit samples with a 16,000 (16KHz) sampling rate.
* @param playAudioOptions Options for play audio.
* @return the response payload for play audio operation.
*/
Expand Down Expand Up @@ -310,7 +318,7 @@ Mono<Response<Void>> deleteCallWithResponse(String callId, Context context) {
}

/**
* Cancel Media Operations.
* Cancel all media operations in the call.
*
* @param callId The call leg id.
* @param operationContext operationContext
Expand All @@ -332,7 +340,7 @@ public Mono<CancelAllMediaOperationsResponse> cancelAllMediaOperations(String ca
}

/**
* Cancel Media Operations.
* Cancel all media operations in the call.
*
* @param callId The call leg id.
* @param operationContext operationContext
Expand Down Expand Up @@ -363,13 +371,13 @@ Mono<Response<CancelAllMediaOperationsResponse>> cancelAllMediaOperationsWithRes
}

/**
* Invite Participats to a Call.
* Add a participant to the call.
*
* @param callId Call id.
* @param participant Invited participant.
* @param alternateCallerId of the Invited participant.
* @param alternateCallerId The phone number to use when adding a phone number participant.
* @param operationContext operationContext.
* @return response for a successful inviteParticipants request.
* @return response for a successful addParticipant request.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> addParticipant(String callId,
Expand All @@ -379,7 +387,7 @@ public Mono<Void> addParticipant(String callId,
try {
Objects.requireNonNull(callId, "'callId' cannot be null.");
Objects.requireNonNull(participant, "'request' cannot be null.");
InviteParticipantsRequest request = InviteParticipantsConverter.convert(participant,
InviteParticipantsRequest request = AddParticipantConverter.convert(participant,
alternateCallerId,
operationContext,
null);
Expand All @@ -390,13 +398,13 @@ public Mono<Void> addParticipant(String callId,
}

/**
* Invite Participats to a Call.
* Add a participant to the call.
*
* @param callId Call id.
* @param participant Invited participant.
* @param alternateCallerId of the Invited participant.
* @param alternateCallerId The phone number to use when adding a phone number participant.
* @param operationContext operationContext.
* @return response for a successful inviteParticipants request.
* @return response for a successful addParticipant request.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> addParticipantWithResponse(String callId,
Expand All @@ -418,7 +426,7 @@ Mono<Response<Void>> addParticipantWithResponse(String callId,
try {
Objects.requireNonNull(callId, "'callId' cannot be null.");
Objects.requireNonNull(participant, "'participant' cannot be null.");
InviteParticipantsRequest request = InviteParticipantsConverter.convert(participant, alternateCallerId, operationContext, null);
InviteParticipantsRequest request = AddParticipantConverter.convert(participant, alternateCallerId, operationContext, null);
return withContext(contextValue -> {
contextValue = context == null ? contextValue : context;
return this.callClient.inviteParticipantsWithResponseAsync(callId, request, contextValue);
Expand All @@ -429,7 +437,7 @@ Mono<Response<Void>> addParticipantWithResponse(String callId,
}

/**
* Remove participant from the call.
* Remove a participant from the call.
*
* @param callId Call id.
* @param participantId Participant id.
Expand All @@ -447,7 +455,7 @@ public Mono<Void> removeParticipant(String callId, String participantId) {
}

/**
* Remove participant from the call.
* Remove a participant from the call.
*
* @param callId Call id.
* @param participantId Participant id.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ public Response<CreateCallResponse> createCallWithResponse(CommunicationIdentifi
* Play audio in a call.
*
* @param callId The call id.
* @param audioFileUri The media resource uri of the play audio request.
* @param audioFileUri The media resource uri of the play audio request. Currently only Wave file (.wav) format
* audio prompts are supported. More specifically, the audio content in the wave file must
* be mono (single-channel), 16-bit samples with a 16,000 (16KHz) sampling rate.
* @param loop The flag indicating whether audio file needs to be played in loop or not.
* @param audioFileId An id for the media in the AudioFileUri, using which we cache the media.
* @param callbackUri call back uri to receive notifications.
Expand All @@ -87,7 +89,9 @@ public PlayAudioResponse playAudio(String callId,
* Play audio in a call.
*
* @param callId The call id.
* @param audioFileUri The media resource uri of the play audio request.
* @param audioFileUri The media resource uri of the play audio request. Currently only Wave file (.wav) format
* audio prompts are supported. More specifically, the audio content in the wave file must
* be mono (single-channel), 16-bit samples with a 16,000 (16KHz) sampling rate.
* @param loop The flag indicating whether audio file needs to be played in loop or not.
* @param audioFileId An id for the media in the AudioFileUri, using which we cache the media.
* @param callbackUri call back uri to receive notifications.
Expand All @@ -112,7 +116,9 @@ public Response<PlayAudioResponse> playAudioWithResponse(String callId,
* Play audio in a call.
*
* @param callId The call id.
* @param audioFileUri The media resource uri of the play audio request.
* @param audioFileUri The media resource uri of the play audio request. Currently only Wave file (.wav) format
* audio prompts are supported. More specifically, the audio content in the wave file must
* be mono (single-channel), 16-bit samples with a 16,000 (16KHz) sampling rate.
* @param playAudioOptions Options for play audio.
* @return the response payload for play audio operation.
*/
Expand All @@ -126,7 +132,9 @@ public PlayAudioResponse playAudio(String callId, String audioFileUri, PlayAudio
* Play audio in a call.
*
* @param callId The call id.
* @param audioFileUri The media resource uri of the play audio request.
* @param audioFileUri The media resource uri of the play audio request. Currently only Wave file (.wav) format
* audio prompts are supported. More specifically, the audio content in the wave file must
* be mono (single-channel), 16-bit samples with a 16,000 (16KHz) sampling rate.
* @param playAudioOptions Options for play audio.
* @param context A {@link Context} representing the request context.
* @return the response payload for play audio operation.
Expand All @@ -143,7 +151,7 @@ public Response<PlayAudioResponse> playAudioWithResponse(String callId,
/**
* Disconnect the current caller in a Group-call or end a p2p-call.
*
* @param callId Call id to to hang up.
* @param callId Call id to hang up.
* @return response for a successful HangupCall request.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Expand All @@ -154,7 +162,7 @@ public Void hangupCall(String callId) {
/**
* Disconnect the current caller in a Group-call or end a p2p-call.
*
* @param callId Call id to to hang up.
* @param callId Call id to hang up.
* @param context A {@link Context} representing the request context.
* @return response for a successful HangupCall request.
*/
Expand Down Expand Up @@ -187,7 +195,7 @@ public Response<Void> deleteCallWithResponse(String callId, Context context) {
}

/**
* Cancel Media Operations.
* Cancel all media operations in the call.
*
* @param callId Call id to to cancel media Operations.
* @param operationContext operationContext.
Expand All @@ -199,7 +207,7 @@ public CancelAllMediaOperationsResponse cancelAllMediaOperations(String callId,
}

/**
* Cancel Media Operations.
* Cancel all media operations in the call.
*
* @param callId Call id to to cancel media Operations.
* @param operationContext operationContext.
Expand All @@ -216,13 +224,13 @@ public Response<CancelAllMediaOperationsResponse> cancelAllMediaOperationsWithRe
}

/**
* Invite participants to a call.
* Add a participant to the call.
*
* @param callId Call id.
* @param participant Invited participant.
* @param alternateCallerId alternateCallerId of Invited participant.
* @param alternateCallerId The phone number to use when adding a phone number participant.
* @param operationContext operationContext.
* @return response for a successful inviteParticipants request.
* @return response for a successful addParticipant request.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Void addParticipant(String callId,
Expand All @@ -236,14 +244,14 @@ public Void addParticipant(String callId,
}

/**
* Invite participants to a call.
* Add a participant to the call.
*
* @param callId Call id.
* @param participant Invited participant.
* @param alternateCallerId alternateCallerId of Invited participant.
* @param alternateCallerId The phone number to use when adding a phone number participant.
* @param operationContext operationContext.
* @param context A {@link Context} representing the request context.
* @return response for a successful inviteParticipants request.
* @return response for a successful addParticipant request.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> addParticipantWithResponse(String callId,
Expand All @@ -259,7 +267,7 @@ public Response<Void> addParticipantWithResponse(String callId,
}

/**
* Remove participant from the call.
* Remove a participant from the call.
*
* @param callId Call id.
* @param participantId Participant id.
Expand All @@ -271,7 +279,7 @@ public Void removeParticipant(String callId, String participantId) {
}

/**
* Remove participant from the call.
* Remove a participant from the call.
*
* @param callId Call id.
* @param participantId Participant id.
Expand Down
Loading

0 comments on commit 05e309c

Please sign in to comment.