/// <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)); }
/// <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)); }
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() )); }
/// <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)); }
/// <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)); }