예제 #1
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update RoomParticipant parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of RoomParticipant </returns>
        public static RoomParticipantResource Update(UpdateRoomParticipantOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
예제 #2
0
 private static Request BuildUpdateRequest(UpdateRoomParticipantOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Video,
                "/v1/Rooms/" + options.PathRoomSid + "/Participants/" + options.PathSid + "",
                client.Region,
                postParams: options.GetParams()
                ));
 }
예제 #3
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathRoomSid"> The room_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="status"> The status </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of RoomParticipant </returns>
        public static async System.Threading.Tasks.Task <RoomParticipantResource> UpdateAsync(string pathRoomSid,
                                                                                              string pathSid,
                                                                                              RoomParticipantResource.StatusEnum status = null,
                                                                                              ITwilioRestClient client = null)
        {
            var options = new UpdateRoomParticipantOptions(pathRoomSid, pathSid)
            {
                Status = status
            };

            return(await UpdateAsync(options, client));
        }
예제 #4
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathRoomSid"> The room_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="status"> The status </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of RoomParticipant </returns>
        public static RoomParticipantResource Update(string pathRoomSid,
                                                     string pathSid,
                                                     RoomParticipantResource.StatusEnum status = null,
                                                     ITwilioRestClient client = null)
        {
            var options = new UpdateRoomParticipantOptions(pathRoomSid, pathSid)
            {
                Status = status
            };

            return(Update(options, client));
        }
예제 #5
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update RoomParticipant parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of RoomParticipant </returns>
        public static async System.Threading.Tasks.Task <RoomParticipantResource> UpdateAsync(UpdateRoomParticipantOptions options,
                                                                                              ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }