// GET: /api/views/{id}

        /// <summary>
        ///     Returns cumulative number of views for project.
        /// </summary>
        /// <param name="id">Project id</param>
        /// <returns></returns>
        public async Task <long> Get(string id)
        {
            await _watchProjectService.CheckProjectAsync(id, UserId);

            DomainItemCounts counts = await _cassandraStatisticsService.GetItemCountsAsync(StatisticsSpaces.Projects, id);

            return(counts.Views);
        }
        public async Task <HttpResponseMessage> Get(string id, ODataQueryOptions <UserInfo> options)
        {
            await _watchProjectService.CheckProjectAsync(id, UserId);

            var validationSettings = new ODataValidationSettings
            {
                MaxTop = 100,
                AllowedArithmeticOperators = AllowedArithmeticOperators.None,
                AllowedFunctions           = AllowedFunctions.None,
                AllowedLogicalOperators    = AllowedLogicalOperators.None,
                AllowedQueryOptions        = AllowedQueryOptions.Skip | AllowedQueryOptions.Top
            };

            // Validating OData
            try
            {
                options.Validate(validationSettings);
            }
            catch (Exception)
            {
                throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ResponseMessages.InvalidQueryOptions));
            }

            // Parsing filter parameters
            DataQueryOptions filter;

            try
            {
                filter = _mapper.Map <ODataQueryOptions, DataQueryOptions>(options);
            }
            catch (AutoMapperMappingException)
            {
                throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ResponseMessages.InvalidQueryOptions));
            }

            // Retrieving projects
            IEnumerable <UserInfo> users;

            try
            {
                users = await _projectLikesService.GetProjectLikersSequenceAsync(id, filter);
            }
            catch (NotSupportedException)
            {
                throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ResponseMessages.BadRequest));
            }

            return(Request.CreateResponse(HttpStatusCode.OK, users));
        }