コード例 #1
0
        /// <summary>
        /// read
        /// </summary>
        ///
        /// <param name="pathServiceSid"> The service_sid </param>
        /// <param name="pathMapSid"> The map_sid </param>
        /// <param name="order"> The order </param>
        /// <param name="from"> The from </param>
        /// <param name="bounds"> The bounds </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 SyncMapItem </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <SyncMapItemResource> > ReadAsync(string pathServiceSid, string pathMapSid, SyncMapItemResource.QueryResultOrderEnum order = null, string from = null, SyncMapItemResource.QueryFromBoundTypeEnum bounds = null, int?pageSize = null, long?limit = null, ITwilioRestClient client = null)
        {
            var options = new ReadSyncMapItemOptions(pathServiceSid, pathMapSid)
            {
                Order = order, From = from, Bounds = bounds, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }
コード例 #2
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="options"> Read SyncMapItem parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of SyncMapItem </returns>
        public static ResourceSet <SyncMapItemResource> Read(ReadSyncMapItemOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildReadRequest(options, client));

            var page = Page <SyncMapItemResource> .FromJson("items", response.Content);

            return(new ResourceSet <SyncMapItemResource>(page, options, client));
        }
コード例 #3
0
 private static Request BuildReadRequest(ReadSyncMapItemOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Get,
                Rest.Domain.Preview,
                "/Sync/Services/" + options.PathServiceSid + "/Maps/" + options.PathMapSid + "/Items",
                queryParams: options.GetParams()
                ));
 }
コード例 #4
0
        /// <summary>
        /// read
        /// </summary>
        /// <param name="options"> Read SyncMapItem parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of SyncMapItem </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <SyncMapItemResource> > ReadAsync(ReadSyncMapItemOptions options,
                                                                                                       ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildReadRequest(options, client));

            var page = Page <SyncMapItemResource> .FromJson("items", response.Content);

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