Пример #1
0
        /// <summary>
        /// Get details app information by assetID
        /// </summary>
        /// <param name="assetId"></param>
        /// <returns></returns>
        private App GetApp(string assetId)
        {
            var appDetailsUrl = string.Format(AppDetails, assetId);

            dynamic main    = ExecuteRequestGet(_siteUrl + appDetailsUrl);
            var     details = main.BasicDetails;
            var     app     = new App()
            {
                AssetId            = details.AssetId
                , Title            = details.Title
                , ShortDescription = details.ShortDescription
                , ThumbnailUrl     = details.ThumbnailUrl
                , Publisher        = details.Publisher
                , Price            = details.Price
                , CategoryID       = details.CategoryID
                , PriceType        = details.PriceType
                , Description      = main.Description
                , PriceValue       = main.PriceValue
                , PublisherUrl     = main.PublisherUrl
                , ReleasedDate     = DateTime.Parse(main.ReleasedDate.ToString())
            };

            app.HistoricalData.Add(new History()
            {
                AssetId     = details.AssetId
                , Date      = _now
                , Downloads = main.Downloads
                , Votes     = details.Votes
                , Rating    = details.Rating
            });

            return(app);
        }
Пример #2
0
        /// <summary>
        /// Get details app information by assetID
        /// </summary>
        /// <param name="assetId"></param>
        /// <returns></returns>
        private App GetApp(string assetId)
        {
            var appDetailsUrl = string.Format(AppDetails, assetId);

            dynamic main = ExecuteRequestGet(_siteUrl + appDetailsUrl);
            var details  = main.BasicDetails;
            var app      = new App()
            {
                AssetId            = details.AssetId
                , Title            = details.Title
                , ShortDescription = details.ShortDescription
                , ThumbnailUrl     = details.ThumbnailUrl
                , Publisher        = details.Publisher
                , Price            = details.Price
                , CategoryID       = details.CategoryID
                , PriceType        = details.PriceType
                , Description      = main.Description
                , PriceValue       = main.PriceValue
                , PublisherUrl     = main.PublisherUrl
                , ReleasedDate     = DateTime.Parse(main.ReleasedDate.ToString())
            };

            app.HistoricalData.Add(new History()
            {
                AssetId     = details.AssetId
                , Date      = _now
                , Downloads = main.Downloads
                , Votes     = details.Votes
                , Rating    = details.Rating
            });

            return app;
        }