diff --git a/src/OnePeek.WebConsole/Modules/HomeModule.cs b/src/OnePeek.WebConsole/Modules/HomeModule.cs index 06d2ce8..07ff9c3 100644 --- a/src/OnePeek.WebConsole/Modules/HomeModule.cs +++ b/src/OnePeek.WebConsole/Modules/HomeModule.cs @@ -19,6 +19,7 @@ namespace OnePeek.WebConsole.Modules return View["Index"]; }; + Get["/meta", true] = async (ctx, token) => { AppMetadata meta = await api.GetMetadata(Request.Query["id"], StoreType.WindowsPhone8, StoreCultureType.EN_US); @@ -32,6 +33,14 @@ namespace OnePeek.WebConsole.Modules return View["Reviews", reviews]; }; + + Get["/search", true] = async (ctx, token) => + { + StoreSearchResults result = await api.Search(Request.Query["term"], StoreType.WindowsPhone8, StoreCultureType.EN_US); + return View["Search", result]; + }; + + Get["/ratings", true] = async (ctx, token) => { var order = Request.Query["order"]; diff --git a/src/OnePeek.WebConsole/OnePeek.WebConsole.csproj b/src/OnePeek.WebConsole/OnePeek.WebConsole.csproj index cda1862..ccbe5bc 100644 --- a/src/OnePeek.WebConsole/OnePeek.WebConsole.csproj +++ b/src/OnePeek.WebConsole/OnePeek.WebConsole.csproj @@ -80,6 +80,7 @@ + Web.config diff --git a/src/OnePeek.WebConsole/Views/Index.cshtml b/src/OnePeek.WebConsole/Views/Index.cshtml index 6eef642..e8bb261 100644 --- a/src/OnePeek.WebConsole/Views/Index.cshtml +++ b/src/OnePeek.WebConsole/Views/Index.cshtml @@ -3,24 +3,41 @@ Layout = "_Layout.cshtml"; } -
-

META

- - + +
+

API QUERY

+
+
+ +
+
+ +
+
+ +
+


-
-

REVIEWS

- - + +
+

SEARCH

+ + +
-

-
-

RATINGS

- - -
\ No newline at end of file + \ No newline at end of file diff --git a/src/OnePeek.WebConsole/Views/Search.cshtml b/src/OnePeek.WebConsole/Views/Search.cshtml new file mode 100644 index 0000000..4e22492 --- /dev/null +++ b/src/OnePeek.WebConsole/Views/Search.cshtml @@ -0,0 +1,23 @@ +@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase +@{ + Layout = "_Layout.cshtml"; +} + +@foreach (var result in Model.Results) +{ +
+ @result.Name +
+
+} + + \ No newline at end of file diff --git a/src/OnePeek.WebConsole/Views/_Layout.cshtml b/src/OnePeek.WebConsole/Views/_Layout.cshtml index aaf1cd9..4ad9868 100644 --- a/src/OnePeek.WebConsole/Views/_Layout.cshtml +++ b/src/OnePeek.WebConsole/Views/_Layout.cshtml @@ -5,16 +5,16 @@ + + +

@RenderBody()
- - - \ No newline at end of file