/// <summary>
        /// Retrieve a list of conferences belonging to the account used to make the request
        /// </summary>
        ///
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="dateCreatedBefore"> Filter by date created </param>
        /// <param name="dateCreated"> Filter by date created </param>
        /// <param name="dateCreatedAfter"> Filter by date created </param>
        /// <param name="dateUpdatedBefore"> Filter by date updated </param>
        /// <param name="dateUpdated"> Filter by date updated </param>
        /// <param name="dateUpdatedAfter"> Filter by date updated </param>
        /// <param name="friendlyName"> Filter by friendly name </param>
        /// <param name="status"> The status of the conference </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 Conference </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <ConferenceResource> > ReadAsync(string pathAccountSid = null, DateTime?dateCreatedBefore = null, DateTime?dateCreated = null, DateTime?dateCreatedAfter = null, DateTime?dateUpdatedBefore = null, DateTime?dateUpdated = null, DateTime?dateUpdatedAfter = null, string friendlyName = null, ConferenceResource.StatusEnum status = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadConferenceOptions {
                PathAccountSid = pathAccountSid, DateCreatedBefore = dateCreatedBefore, DateCreated = dateCreated, DateCreatedAfter = dateCreatedAfter, DateUpdatedBefore = dateUpdatedBefore, DateUpdated = dateUpdated, DateUpdatedAfter = dateUpdatedAfter, FriendlyName = friendlyName, Status = status, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Retrieve a list of conferences belonging to the account used to make the request
        /// </summary>
        /// <param name="options"> Read Conference parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Conference </returns>
        public static ResourceSet <ConferenceResource> Read(ReadConferenceOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

            var page = Page <ConferenceResource> .FromJson("conferences", response.Content);

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

            var page = Page <ConferenceResource> .FromJson("conferences", response.Content);

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