Beispiel #1
0
        /// <summary>
        /// read
        /// </summary>
        ///
        /// <param name="status"> The status </param>
        /// <param name="uniqueName"> The unique_name </param>
        /// <param name="dateCreatedAfter"> The date_created_after </param>
        /// <param name="dateCreatedBefore"> The date_created_before </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </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 <ResourceSet <RoomResource> > ReadAsync(RoomResource.RoomStatusEnum status = null, string uniqueName = null, DateTime?dateCreatedAfter = null, DateTime?dateCreatedBefore = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadRoomOptions {
                Status = status, UniqueName = uniqueName, DateCreatedAfter = dateCreatedAfter, DateCreatedBefore = dateCreatedBefore, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
Beispiel #2
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="options"> Read Room parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Room </returns>
        public static ResourceSet <RoomResource> Read(ReadRoomOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

            var page = Page <RoomResource> .FromJson("rooms", response.Content);

            return(new ResourceSet <RoomResource>(page, options, client));
        }
Beispiel #3
0
 private static Request BuildReadRequest(ReadRoomOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Video,
                "/v1/Rooms",
                queryParams: options.GetParams()
                ));
 }
Beispiel #4
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="status"> The status </param>
        /// <param name="uniqueName"> The unique_name </param>
        /// <param name="dateCreatedAfter"> The date_created_after </param>
        /// <param name="dateCreatedBefore"> The date_created_before </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Room </returns>
        public static ResourceSet <RoomResource> Read(RoomResource.RoomStatusEnum status = null,
                                                      string uniqueName          = null,
                                                      DateTime?dateCreatedAfter  = null,
                                                      DateTime?dateCreatedBefore = null,
                                                      int?pageSize             = null,
                                                      long?limit               = null,
                                                      ITwilioRestClient client = null)
        {
            var options = new ReadRoomOptions()
            {
                Status = status, UniqueName = uniqueName, DateCreatedAfter = dateCreatedAfter, DateCreatedBefore = dateCreatedBefore, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
Beispiel #5
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="options"> Read 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 <ResourceSet <RoomResource> > ReadAsync(ReadRoomOptions options,
                                                                                                ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <RoomResource> .FromJson("rooms", response.Content);

            return(new ResourceSet <RoomResource>(page, options, client));
        }