示例#1
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="options"> Fetch RoomParticipant parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of RoomParticipant </returns>
        public static RoomParticipantResource Fetch(FetchRoomParticipantOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }
示例#2
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathRoomSid"> The room_sid </param>
        /// <param name="pathSid"> The sid </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 <RoomParticipantResource> FetchAsync(string pathRoomSid,
                                                                                             string pathSid,
                                                                                             ITwilioRestClient client = null)
        {
            var options = new FetchRoomParticipantOptions(pathRoomSid, pathSid);

            return(await FetchAsync(options, client));
        }
示例#3
0
 private static Request BuildFetchRequest(FetchRoomParticipantOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Video,
                "/v1/Rooms/" + options.PathRoomSid + "/Participants/" + options.PathSid + "",
                client.Region,
                queryParams: options.GetParams()
                ));
 }
示例#4
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="pathRoomSid"> The room_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of RoomParticipant </returns>
        public static RoomParticipantResource Fetch(string pathRoomSid, string pathSid, ITwilioRestClient client = null)
        {
            var options = new FetchRoomParticipantOptions(pathRoomSid, pathSid);

            return(Fetch(options, client));
        }
示例#5
0
        /// <summary>
        /// fetch
        /// </summary>
        /// <param name="options"> Fetch 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 <RoomParticipantResource> FetchAsync(FetchRoomParticipantOptions options,
                                                                                             ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildFetchRequest(options, client));

            return(FromJson(response.Content));
        }