|
@ -1,17 +1,18 @@ |
|
|
using System; |
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
|
using System.Linq; |
|
|
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
|
|
|
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config |
|
|
namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
public class UrlsConfig |
|
|
public class UrlsConfig |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
public class CatalogOperations |
|
|
public class CatalogOperations |
|
|
{ |
|
|
{ |
|
|
// grpc call under REST must go trough port 80
|
|
|
// grpc call under REST must go trough port 80
|
|
|
public static string GetItemById(int id) => $"/api/v1/catalog/items/{id}"; |
|
|
public static string GetItemById(int id) => $"/api/v1/catalog/items/{id}"; |
|
|
|
|
|
|
|
|
public static string GetItemById(string ids) => $"/api/v1/catalog/items/ids/{string.Join(',', ids)}"; |
|
|
public static string GetItemById(string ids) => $"/api/v1/catalog/items/ids/{string.Join(',', ids)}"; |
|
|
|
|
|
|
|
|
// REST call standard must go through port 5000
|
|
|
// REST call standard must go through port 5000
|
|
|
public static string GetItemsById(IEnumerable<int> ids) => $":5000/api/v1/catalog/items?ids={string.Join(',', ids)}"; |
|
|
public static string GetItemsById(IEnumerable<int> ids) => $":5000/api/v1/catalog/items?ids={string.Join(',', ids)}"; |
|
|
} |
|
|
} |
|
@ -19,6 +20,7 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config |
|
|
public class BasketOperations |
|
|
public class BasketOperations |
|
|
{ |
|
|
{ |
|
|
public static string GetItemById(string id) => $"/api/v1/basket/{id}"; |
|
|
public static string GetItemById(string id) => $"/api/v1/basket/{id}"; |
|
|
|
|
|
|
|
|
public static string UpdateBasket() => "/api/v1/basket"; |
|
|
public static string UpdateBasket() => "/api/v1/basket"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -28,10 +30,16 @@ namespace Microsoft.eShopOnContainers.Web.Shopping.HttpAggregator.Config |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public string Basket { get; set; } |
|
|
public string Basket { get; set; } |
|
|
|
|
|
|
|
|
public string Catalog { get; set; } |
|
|
public string Catalog { get; set; } |
|
|
|
|
|
|
|
|
public string Orders { get; set; } |
|
|
public string Orders { get; set; } |
|
|
|
|
|
|
|
|
public string GrpcBasket { get; set; } |
|
|
public string GrpcBasket { get; set; } |
|
|
|
|
|
|
|
|
public string GrpcCatalog { get; set; } |
|
|
public string GrpcCatalog { get; set; } |
|
|
|
|
|
|
|
|
public string GrpcOrdering { get; set; } |
|
|
public string GrpcOrdering { get; set; } |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |