/// <summary> /// fetch /// </summary> /// <param name="options"> Fetch PublishedTrack parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of PublishedTrack </returns> public static PublishedTrackResource Fetch(FetchPublishedTrackOptions 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="pathParticipantSid"> The participant_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of PublishedTrack </returns> public static PublishedTrackResource Fetch(string pathRoomSid, string pathParticipantSid, string pathSid, ITwilioRestClient client = null) { var options = new FetchPublishedTrackOptions(pathRoomSid, pathParticipantSid, pathSid); return(Fetch(options, client)); }
/// <summary> /// fetch /// </summary> /// <param name="pathRoomSid"> The room_sid </param> /// <param name="pathParticipantSid"> The participant_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 PublishedTrack </returns> public static async System.Threading.Tasks.Task <PublishedTrackResource> FetchAsync(string pathRoomSid, string pathParticipantSid, string pathSid, ITwilioRestClient client = null) { var options = new FetchPublishedTrackOptions(pathRoomSid, pathParticipantSid, pathSid); return(await FetchAsync(options, client)); }
private static Request BuildFetchRequest(FetchPublishedTrackOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Video, "/v1/Rooms/" + options.PathRoomSid + "/Participants/" + options.PathParticipantSid + "/PublishedTracks/" + options.PathSid + "", client.Region, queryParams: options.GetParams() )); }
/// <summary> /// fetch /// </summary> /// <param name="options"> Fetch PublishedTrack parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of PublishedTrack </returns> public static async System.Threading.Tasks.Task <PublishedTrackResource> FetchAsync(FetchPublishedTrackOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }