Beispiel #1
0
        /// <summary>
        /// Returns a list of Recording Rules for the Room.
        /// </summary>
        /// <param name="pathRoomSid"> The SID of the Room resource where the recording rules to fetch apply </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> FetchAsync(string pathRoomSid,
                                                                                            ITwilioRestClient client = null)
        {
            var options = new FetchRecordingRulesOptions(pathRoomSid);

            return(await FetchAsync(options, client));
        }
Beispiel #2
0
        /// <summary>
        /// Returns a list of Recording Rules for the Room.
        /// </summary>
        /// <param name="options"> Fetch RecordingRules parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of RecordingRules </returns>
        public static RecordingRulesResource Fetch(FetchRecordingRulesOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
Beispiel #3
0
 private static Request BuildFetchRequest(FetchRecordingRulesOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Video,
                "/v1/Rooms/" + options.PathRoomSid + "/RecordingRules",
                queryParams: options.GetParams(),
                headerParams: null
                ));
 }
Beispiel #4
0
        /// <summary>
        /// Returns a list of Recording Rules for the Room.
        /// </summary>
        /// <param name="pathRoomSid"> The SID of the Room resource where the recording rules to fetch apply </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of RecordingRules </returns>
        public static RecordingRulesResource Fetch(string pathRoomSid, ITwilioRestClient client = null)
        {
            var options = new FetchRecordingRulesOptions(pathRoomSid);

            return(Fetch(options, client));
        }
Beispiel #5
0
        /// <summary>
        /// Returns a list of Recording Rules for the Room.
        /// </summary>
        /// <param name="options"> Fetch 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> FetchAsync(FetchRecordingRulesOptions options,
                                                                                            ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }