diff --git a/src/OnePeek.Api/AppRatingEndpoint.cs b/src/OnePeek.Api/AppRatingEndpoint.cs index e74ed46..c4d8041 100644 --- a/src/OnePeek.Api/AppRatingEndpoint.cs +++ b/src/OnePeek.Api/AppRatingEndpoint.cs @@ -1,13 +1,10 @@ -using Bender; -using OnePeek.Api.Extensions; +using OnePeek.Api.Extensions; using OnePeek.Entities; using System; -using System.Diagnostics; -using System.IO; +using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using System.Xml.Linq; -using System.Linq; -using System.Collections.Generic; namespace OnePeek.Api { @@ -26,12 +23,14 @@ namespace OnePeek.Api IEnumerable xel = XDocument.Parse(xml).Elements().First().Descendants(); - AppReviews result = new AppReviews(); - result.Id = appId; - result.StoreType = store; - result.StoreCultureType = storeCulture; - result.Sorting = sorting; - result.StoreDataModifiedDate = DateTime.Parse(xel.Get("updated")); + AppReviews result = new AppReviews() + { + Id = appId, + StoreType = store, + StoreCultureType = storeCulture, + Sorting = sorting, + StoreDataModifiedDate = DateTime.Parse(xel.Get("updated")) + }; // parse markers result.PrevPageMarkerId = Utils.GetQueryPart(xel.FirstOrDefault(x => x.Name.LocalName == "link" && x.Attribute("rel").Value == "prev"), "href", "beforeMarker"); diff --git a/src/OnePeek.WebConsole/ApiModule.cs b/src/OnePeek.WebConsole/ApiModule.cs index ce5c82d..3fccc74 100644 --- a/src/OnePeek.WebConsole/ApiModule.cs +++ b/src/OnePeek.WebConsole/ApiModule.cs @@ -1,5 +1,4 @@ using Nancy; -using Nancy.Responses; using OnePeek.Api; using OnePeek.Entities; using System.IO; @@ -18,7 +17,6 @@ namespace OnePeek.WebConsole { AppMetadata meta = await metaEndpoint.GetMetadata(ctx.id, StoreType.WindowsPhone8, StoreCultureType.EN_US); return Response.AsJson(meta); - //return new JsonResponse(ctx) };