This commit is contained in:
2015-04-02 23:03:54 +02:00
parent 133920ae58
commit 829d3f8f34
2 changed files with 11 additions and 14 deletions
+11 -12
View File
@@ -1,13 +1,10 @@
using Bender; using OnePeek.Api.Extensions;
using OnePeek.Api.Extensions;
using OnePeek.Entities; using OnePeek.Entities;
using System; using System;
using System.Diagnostics; using System.Collections.Generic;
using System.IO; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Xml.Linq; using System.Xml.Linq;
using System.Linq;
using System.Collections.Generic;
namespace OnePeek.Api namespace OnePeek.Api
{ {
@@ -26,12 +23,14 @@ namespace OnePeek.Api
IEnumerable<XElement> xel = XDocument.Parse(xml).Elements().First().Descendants(); IEnumerable<XElement> xel = XDocument.Parse(xml).Elements().First().Descendants();
AppReviews result = new AppReviews(); AppReviews result = new AppReviews()
result.Id = appId; {
result.StoreType = store; Id = appId,
result.StoreCultureType = storeCulture; StoreType = store,
result.Sorting = sorting; StoreCultureType = storeCulture,
result.StoreDataModifiedDate = DateTime.Parse(xel.Get("updated")); Sorting = sorting,
StoreDataModifiedDate = DateTime.Parse(xel.Get("updated"))
};
// parse markers // parse markers
result.PrevPageMarkerId = Utils.GetQueryPart(xel.FirstOrDefault(x => x.Name.LocalName == "link" && x.Attribute("rel").Value == "prev"), "href", "beforeMarker"); result.PrevPageMarkerId = Utils.GetQueryPart(xel.FirstOrDefault(x => x.Name.LocalName == "link" && x.Attribute("rel").Value == "prev"), "href", "beforeMarker");
-2
View File
@@ -1,5 +1,4 @@
using Nancy; using Nancy;
using Nancy.Responses;
using OnePeek.Api; using OnePeek.Api;
using OnePeek.Entities; using OnePeek.Entities;
using System.IO; using System.IO;
@@ -18,7 +17,6 @@ namespace OnePeek.WebConsole
{ {
AppMetadata meta = await metaEndpoint.GetMetadata(ctx.id, StoreType.WindowsPhone8, StoreCultureType.EN_US); AppMetadata meta = await metaEndpoint.GetMetadata(ctx.id, StoreType.WindowsPhone8, StoreCultureType.EN_US);
return Response.AsJson(meta); return Response.AsJson(meta);
//return new JsonResponse(ctx)
}; };