/// <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)); }
/// <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)); }
private static Request BuildReadRequest(ReadRoomOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Video, "/v1/Rooms", queryParams: options.GetParams() )); }
/// <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)); }
/// <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)); }