Skip to content

Commit

Permalink
Fix RapidSkins site inventory for CS2
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyskoedijk committed Aug 25, 2024
1 parent dd50daf commit 31b81ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions SCMM.Market.RapidSkins.Client/RapidSkinsWebClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class RapidSkinsWebClient : Shared.Web.Client.WebClientBase

public RapidSkinsWebClient(ILogger<RapidSkinsWebClient> logger) : base(logger) { }

public async Task<RapidSkinsPaginatedItems> GetSiteInventoryAsync(string appId, int page = 1)
public async Task<RapidSkinsPaginatedItems> GetSiteInventoryAsync(string appId, string appName, int page = 1)
{
using (var client = BuildWebApiHttpClient(host: new Uri(ApiBaseUri)))
{
Expand All @@ -26,7 +26,7 @@ query Inventories($filter: InventoryFilters!) {
}
}
fragment InventoryFragment on CompleteInventory {
rust {
" + appName.ToLower() + @" {
... on SteamInventory {
lastPage
items {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private async Task UpdateRapidSkinsMarketPricesForApp(ILogger logger, SteamApp a
var page = 1;
do
{
rapidSkinsPaginatedItems = await _rapidSkinsWebClient.GetSiteInventoryAsync(app.SteamId, page);
rapidSkinsPaginatedItems = await _rapidSkinsWebClient.GetSiteInventoryAsync(app.SteamId, app.Name, page);
if (rapidSkinsPaginatedItems.Items?.Any() == true)
{
rapidSkinsAppItems.AddRange(rapidSkinsPaginatedItems.Items);
Expand Down

0 comments on commit 31b81ed

Please sign in to comment.