Пример #1
0
        /// <summary>
        /// update
        /// </summary>
        ///
        /// <param name="options"> Update Room parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Room </returns>
        public static async System.Threading.Tasks.Task <RoomResource> UpdateAsync(UpdateRoomOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Пример #2
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="options"> Update Room parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Room </returns>
        public static RoomResource Update(UpdateRoomOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Пример #3
0
        /// <summary>
        /// update
        /// </summary>
        /// <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 Room </returns>
        public static async System.Threading.Tasks.Task <RoomResource> UpdateAsync(string pathSid,
                                                                                   RoomResource.RoomStatusEnum status,
                                                                                   ITwilioRestClient client = null)
        {
            var options = new UpdateRoomOptions(pathSid, status);

            return(await UpdateAsync(options, client));
        }
Пример #4
0
        /// <summary>
        /// update
        /// </summary>
        /// <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 Room </returns>
        public static RoomResource Update(string pathSid,
                                          RoomResource.RoomStatusEnum status,
                                          ITwilioRestClient client = null)
        {
            var options = new UpdateRoomOptions(pathSid, status);

            return(Update(options, client));
        }
Пример #5
0
 private static Request BuildUpdateRequest(UpdateRoomOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Video,
                "/v1/Rooms/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }