示例#1
0
        /// <summary>
        /// Retrieve a list of all Streams in a Service Instance.
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Sync Service with the Stream resources to read </param>
        /// <param name="hideExpired"> Hide expired Sync Streams and show only active ones. </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 SyncStream </returns>
        public static ResourceSet <SyncStreamResource> Read(string pathServiceSid,
                                                            SyncStreamResource.HideExpiredTypeEnum hideExpired = null,
                                                            int?pageSize             = null,
                                                            long?limit               = null,
                                                            ITwilioRestClient client = null)
        {
            var options = new ReadSyncStreamOptions(pathServiceSid)
            {
                HideExpired = hideExpired, PageSize = pageSize, Limit = limit
            };

            return(Read(options, client));
        }
示例#2
0
        /// <summary>
        /// Retrieve a list of all Streams in a Service Instance.
        /// </summary>
        /// <param name="pathServiceSid"> The SID of the Sync Service with the Stream resources to read </param>
        /// <param name="hideExpired"> Hide expired Sync Streams and show only active ones. </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 SyncStream </returns>
        public static async System.Threading.Tasks.Task <ResourceSet <SyncStreamResource> > ReadAsync(string pathServiceSid,
                                                                                                      SyncStreamResource.HideExpiredTypeEnum hideExpired = null,
                                                                                                      int?pageSize             = null,
                                                                                                      long?limit               = null,
                                                                                                      ITwilioRestClient client = null)
        {
            var options = new ReadSyncStreamOptions(pathServiceSid)
            {
                HideExpired = hideExpired, PageSize = pageSize, Limit = limit
            };

            return(await ReadAsync(options, client));
        }