public void GetCatalogItemsByRecent(long scheduledThemeChallengeId, string cursor = "") { string prefixedCacheId = CatalogItemsRequest.GetPrefixedCacheId("Recent", scheduledThemeChallengeId); if (cache.isShouldUseCache(prefixedCacheId)) { CatalogCacheData cacheDataById = cache.GetCacheDataById(prefixedCacheId); Service.Get <EventDispatcher>().DispatchEvent(new CatalogServiceProxyEvents.ShopItemsReponse(cacheDataById.Data as List <CatalogItemData>)); } else { new CatalogItemsByRecentRequest(scheduledThemeChallengeId, cursor); } }
public CatalogItemsByCategoryRequest(string category, long scheduledThemeChallengeId, string cursor = "") { CacheId = CatalogItemsRequest.GetPrefixedCacheId(category, scheduledThemeChallengeId); Service.Get <EventDispatcher>().AddListener <CatalogServiceEvents.CatalogItemsByCategoryRetrievedEvent>(onItemsByCategory); Service.Get <INetworkServicesManager>().CatalogService.GetCatalogItemsByCategory(category, scheduledThemeChallengeId, cursor); }
public CatalogItemsByPopularRequest(long scheduledThemeChallengeId, string cursor = "") { CacheId = CatalogItemsRequest.GetPrefixedCacheId("Popular", scheduledThemeChallengeId); Service.Get <EventDispatcher>().AddListener <CatalogServiceEvents.CatalogItemsByPopularityRetrievedEvent>(onItems); Service.Get <INetworkServicesManager>().CatalogService.GetCatalogItemsByPopularity(scheduledThemeChallengeId, cursor); }