/// <summary> /// Returns a list of Subscribe Rules for the Participant. /// </summary> /// <param name="options"> Fetch SubscribeRules parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SubscribeRules </returns> public static SubscribeRulesResource Fetch(FetchSubscribeRulesOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }
/// <summary> /// Returns a list of Subscribe Rules for the Participant. /// </summary> /// <param name="pathRoomSid"> The SID of the Room resource where the subscribe rules to fetch apply </param> /// <param name="pathParticipantSid"> The SID of the Participant resource with the subscribe rules to fetch </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SubscribeRules </returns> public static async System.Threading.Tasks.Task <SubscribeRulesResource> FetchAsync(string pathRoomSid, string pathParticipantSid, ITwilioRestClient client = null) { var options = new FetchSubscribeRulesOptions(pathRoomSid, pathParticipantSid); return(await FetchAsync(options, client)); }
/// <summary> /// Returns a list of Subscribe Rules for the Participant. /// </summary> /// <param name="pathRoomSid"> The SID of the Room resource where the subscribe rules to fetch apply </param> /// <param name="pathParticipantSid"> The SID of the Participant resource with the subscribe rules to fetch </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of SubscribeRules </returns> public static SubscribeRulesResource Fetch(string pathRoomSid, string pathParticipantSid, ITwilioRestClient client = null) { var options = new FetchSubscribeRulesOptions(pathRoomSid, pathParticipantSid); return(Fetch(options, client)); }
private static Request BuildFetchRequest(FetchSubscribeRulesOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Get, Rest.Domain.Video, "/v1/Rooms/" + options.PathRoomSid + "/Participants/" + options.PathParticipantSid + "/SubscribeRules", queryParams: options.GetParams() )); }
/// <summary> /// Returns a list of Subscribe Rules for the Participant. /// </summary> /// <param name="options"> Fetch SubscribeRules parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of SubscribeRules </returns> public static async System.Threading.Tasks.Task <SubscribeRulesResource> FetchAsync(FetchSubscribeRulesOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildFetchRequest(options, client)); return(FromJson(response.Content)); }