-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
89 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace OSItemIndex.API.Controllers | ||
{ | ||
public class CompositeController | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace OSItemIndex.API.Controllers | ||
{ | ||
[ApiController] | ||
[Route("prices")] | ||
public class PricesController : Controller | ||
{ | ||
|
||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/OSItemIndex.API/Controllers/RealtimePricesController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using Microsoft.AspNetCore.Mvc; | ||
using OSItemIndex.API.Models; | ||
using OSItemIndex.Data; | ||
|
||
namespace OSItemIndex.API.Controllers | ||
{ | ||
[ApiController] | ||
[Route("prices/realtime")] | ||
public class PricesRealtimeController : Controller | ||
{ | ||
|
||
[HttpGet(Name = "GetPrices")] | ||
[Produces("application/json")] | ||
[ResponseCache(VaryByHeader = "Accept-Encoding", Duration = 30)] | ||
public async Task<ActionResult<IEnumerable<RealtimeItemPrice>>> GetPrices() | ||
{ | ||
return Json(await _itemsService.GetItemsAsync(Request.QueryString.HasValue ? query : null)); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace OSItemIndex.API.Repositories | ||
{ | ||
public class PricesRepository : EntityRepository<Real> | ||
{ | ||
public ItemsRepository(IDbContextHelper context) : base(context) { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace OSItemIndex.API.Services | ||
{ | ||
public interface IPricesService | ||
{ | ||
|
||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/OSItemIndex.API/Services/Interfaces/IRealtimePricesService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace OSItemIndex.API.Services | ||
{ | ||
public interface IPricesRealtimeService | ||
{ | ||
|
||
} | ||
} |