Ejemplo n.º 1
0
        /// <summary>
        /// Returns the number of block status changes
        /// </summary>
        /// <param name="options">the options for this query</param>
        /// <returns>the number of block status change events</returns>
        public long GetBlocksCount(BlockParameters options)
        {
            QueryParameters parameters = options.GetQueryParameters();
            ResponseWrapper response   = Get("reports/blocks/count", parameters);

            return(SerializationUtils <long> .FromXmlString(response.Body, "count"));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Returns a page of block status changes. This can either be the contact has been blocked or unblocked. You can filter by the old and new status or you can get the number of block status changes only.
        /// </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 block status change events</returns>
        public Page <Block> GetBlocks(BlockParameters options, int pageIndex, int pageSize)
        {
            QueryParameters parameters = CreatePageQueryParameters(pageIndex, pageSize, options);

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

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

            return(page);
        }