Esempio n. 1
0
        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);
 }
Esempio n. 3
0
 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);
 }