Ejemplo n.º 1
0
        /// <summary>
        /// Returns the number of subscription events based on the specified parameters
        /// </summary>
        /// <param name="options">the options for this query</param>
        /// <returns>the number of subscription events</returns>
        public long GetSubscribersCount(SubscriberParameters options)
        {
            QueryParameters parameters = options.GetQueryParameters();
            ResponseWrapper response   = Get("reports/subscribers/count", parameters);

            return(SerializationUtils <long> .FromXmlString(response.Body, "count"));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns a page of contacts that subscribed for the given account. The contacts can be filtered either by a date interval or one or a list of mailing IDs (DOI Mailings). Note that this only returns subscribers that were subscribed by a DOI mailing that was sent through Maileon.
        /// </summary>
        /// <param name="options">the options for this query</param>
        /// <param name="pageIndex">the index of the page</param>
        /// <param name="pageSize">the size of the page</param>
        /// <returns>a page of subscription events</returns>
        public Page <Subscriber> GetSubscribers(SubscriberParameters options, int pageIndex, int pageSize)
        {
            QueryParameters parameters = CreatePageQueryParameters(pageIndex, pageSize, options);

            ResponseWrapper   response = Get("reports/subscribers", parameters);
            Page <Subscriber> page     = new Page <Subscriber>(pageIndex, pageSize, response);

            page.Items = SerializationUtils <SubscriberCollection> .FromXmlString(response.Body);

            return(page);
        }