Exemplo n.º 1
0
        /// <summary>
        /// Retrieve a list of results belonging to the recording
        /// </summary>
        ///
        /// <param name="pathReferenceSid"> The reference_sid </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="pageSize"> Page size </param>
        /// <param name="limit"> Record limit </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AddOnResult </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <AddOnResultResource> > ReadAsync(string pathReferenceSid, string pathAccountSid = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadAddOnResultOptions(pathReferenceSid)
            {
                PathAccountSid = pathAccountSid, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Retrieve a list of results belonging to the recording
        /// </summary>
        ///
        /// <param name="pathReferenceSid"> The reference_sid </param>
        /// <param name="pathAccountSid"> The account_sid </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 AddOnResult </returns>
        public static ResourceSet <AddOnResultResource> Read(string pathReferenceSid, string pathAccountSid = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadAddOnResultOptions(pathReferenceSid)
            {
                PathAccountSid = pathAccountSid, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Retrieve a list of results belonging to the recording
        /// </summary>
        ///
        /// <param name="options"> Read AddOnResult parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AddOnResult </returns>
        public static ResourceSet <AddOnResultResource> Read(ReadAddOnResultOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

            var page = Page <AddOnResultResource> .FromJson("add_on_results", response.Content);

            return(new ResourceSet <AddOnResultResource>(page, options, client));
        }
Exemplo n.º 4
0
 private static Request BuildReadRequest(ReadAddOnResultOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Api,
                "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/Recordings/" + options.PathReferenceSid + "/AddOnResults.json",
                queryParams: options.GetParams()
                ));
 }
Exemplo n.º 5
0
        /// <summary>
        /// Retrieve a list of results belonging to the recording
        /// </summary>
        ///
        /// <param name="options"> Read AddOnResult parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AddOnResult </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <AddOnResultResource> > ReadAsync(ReadAddOnResultOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <AddOnResultResource> .FromJson("add_on_results", response.Content);

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