Exemple #1
0
        /// <summary>
        /// Update the Recording Rules for the Room
        /// </summary>
        /// <param name="options"> Update RecordingRules parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of RecordingRules </returns>
        public static RecordingRulesResource Update(UpdateRecordingRulesOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Exemple #2
0
        /// <summary>
        /// Update the Recording Rules for the Room
        /// </summary>
        /// <param name="pathRoomSid"> The SID of the Room resource where the recording rules to update apply </param>
        /// <param name="rules"> A JSON-encoded array of recording rules </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of RecordingRules </returns>
        public static RecordingRulesResource Update(string pathRoomSid, object rules = null, ITwilioRestClient client = null)
        {
            var options = new UpdateRecordingRulesOptions(pathRoomSid)
            {
                Rules = rules
            };

            return(Update(options, client));
        }
Exemple #3
0
 private static Request BuildUpdateRequest(UpdateRecordingRulesOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Video,
                "/v1/Rooms/" + options.PathRoomSid + "/RecordingRules",
                postParams: options.GetParams(),
                headerParams: null
                ));
 }
Exemple #4
0
        /// <summary>
        /// Update the Recording Rules for the Room
        /// </summary>
        /// <param name="pathRoomSid"> The SID of the Room resource where the recording rules to update apply </param>
        /// <param name="rules"> A JSON-encoded array of recording rules </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of RecordingRules </returns>
        public static async System.Threading.Tasks.Task <RecordingRulesResource> UpdateAsync(string pathRoomSid,
                                                                                             object rules             = null,
                                                                                             ITwilioRestClient client = null)
        {
            var options = new UpdateRecordingRulesOptions(pathRoomSid)
            {
                Rules = rules
            };

            return(await UpdateAsync(options, client));
        }
Exemple #5
0
        /// <summary>
        /// Update the Recording Rules for the Room
        /// </summary>
        /// <param name="options"> Update RecordingRules parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of RecordingRules </returns>
        public static async System.Threading.Tasks.Task <RecordingRulesResource> UpdateAsync(UpdateRecordingRulesOptions options,
                                                                                             ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }