コード例 #1
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="pathRoomSid"> The room_sid </param>
        /// <param name="status"> The status </param>
        /// <param name="identity"> The identity </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 RoomParticipant </returns>
        public static ResourceSet <RoomParticipantResource> Read(string pathRoomSid,
                                                                 RoomParticipantResource.StatusEnum status = null,
                                                                 string identity            = null,
                                                                 DateTime?dateCreatedAfter  = null,
                                                                 DateTime?dateCreatedBefore = null,
                                                                 int?pageSize             = null,
                                                                 long?limit               = null,
                                                                 ITwilioRestClient client = null)
        {
            var options = new ReadRoomParticipantOptions(pathRoomSid)
            {
                Status = status, Identity = identity, DateCreatedAfter = dateCreatedAfter, DateCreatedBefore = dateCreatedBefore, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
コード例 #2
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="options"> Read RoomParticipant parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of RoomParticipant </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <RoomParticipantResource> > ReadAsync(ReadRoomParticipantOptions options,
                                                                                                           ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <RoomParticipantResource> .FromJson("participants", response.Content);

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