Exemple #1
0
 public SteamCommandProcessor(string steamWebApiKey)
 {
     webInterfaceFactory     = new SteamWebInterfaceFactory(steamWebApiKey);
     steamUserInterface      = webInterfaceFactory.CreateSteamWebInterface <SteamUser>(httpClient);
     steamUserStatsInterface = webInterfaceFactory.CreateSteamWebInterface <SteamUserStats>(httpClient);
     steamIdContainer        = webInterfaceFactory.CreateSteamWebInterface <SteamId>(httpClient);
     playerServiceInterface  = webInterfaceFactory.CreateSteamWebInterface <PlayerService>(httpClient);
     steamNewsInterface      = webInterfaceFactory.CreateSteamWebInterface <SteamNews>(httpClient);
 }
Exemple #2
0
        public static News ToNews(this SteamNews steamNews, Game game)
        {
            var news = new News(game);

            var articles = new List <Article>();

            foreach (var item in steamNews.Appnews.Newsitems)
            {
                articles.Add(
                    new Article()
                {
                    Content = item.Contents,
                    Title   = item.Title
                });
            }
            news.Articles = articles;

            return(news);
        }
 public SteamNewsTests()
 {
     steamInterface = factory.CreateSteamWebInterface <SteamNews>(new HttpClient());
 }