Exemple #1
0
        public static List <SteamUser> GetPlayerSummaries(string apiKey, IEnumerable <long> steamIDs)
        {
            if (steamIDs.Count() > 100)
            {
                throw new ArgumentOutOfRangeException("Too many steam IDs provided. 100 ID limit.");
            }

            return(ApiRequester.GetResponse <List <SteamUser> >($"{BaseUrl}/GetPlayerSummaries/v2?key={apiKey}&steamids={string.Join(",", steamIDs)}", "response", "players"));
        }
Exemple #2
0
        public static long?ResolveVanityUrl(string apiKey, string profileUrl)
        {
            if (profileUrl.EndsWith("/"))
            {
                profileUrl = profileUrl.Substring(0, profileUrl.Length - 1);
            }
            string vanity = profileUrl.Split('/').Last();

            return(ApiRequester.GetResponse <long?>($"{BaseUrl}/ResolveVanityUrl/v1?key={apiKey}&vanityUrl={vanity}", "response", "steamid"));
        }
Exemple #3
0
        public static Dictionary <long, string> GetAppList()
        {
            Dictionary <long, string> output = new Dictionary <long, string>();
            var jarray = ApiRequester.GetResponse <JArray>($"{BaseUrl}/GetAppList/v2", "applist", "apps");

            foreach (var token in jarray)
            {
                output.Add(token["appid"].ToObject <long>(), token["name"].ToString());
            }
            return(output);
        }
Exemple #4
0
 public static List <Friend> GetFriendList(string apiKey, long steamID)
 {
     return(ApiRequester.GetResponse <List <Friend> >($"{BaseUrl}/GetFriendList/v1?key={apiKey}&steamid={steamID}", "friendslist", "friends"));
 }
 public static GameStatsSchema GetSchemaForGame(string apiKey, long appID)
 {
     return(ApiRequester.GetResponse <GameStatsSchema>($"{BaseUrl}/GetSchemaForGame/v2?key={apiKey}&appid={appID}", "game", "availableGameStats"));
 }
 public static UserGameStats GetUserStatsForGame(string apiKey, long steamID, long appID)
 {
     return(ApiRequester.GetResponse <UserGameStats>($"{BaseUrl}/GetUserStatsForGame/v2?key={apiKey}&steamid={steamID}&appid={appID}", "playerstats"));
 }
Exemple #7
0
 public static StoreApp GetAppDetails(long id, string countryCode)
 {
     return(ApiRequester.GetResponse <StoreApp>($"{BaseUrl}?appids={id}&cc={countryCode}", id.ToString(), "data"));
 }
        public static List <OwnedApp> GetOwnedApps(string apiKey, long steamID, bool includeAppInfo = false, bool includePlayedFreeGames = false)
        {
            string url = $"{BaseUrl}/GetOwnedGames/v0001?key={apiKey}&steamid={steamID}&include_appinfo={includeAppInfo}&include_played_free_games={includePlayedFreeGames}";

            return(ApiRequester.GetResponse <List <OwnedApp> >(url, "response", "games"));
        }
 public static List <UserAppPlaytime> GetRecentlyPlayedGames(string apiKey, long steamID, int count = 10)
 {
     return(ApiRequester.GetResponse <List <UserAppPlaytime> >($"{BaseUrl}/GetRecentlyPlayedGames/v1?key={apiKey}&steamid={steamID}&count={count}", "response", "games"));
 }
 public static int GetSteamLevel(string apiKey, long steamID)
 {
     return(ApiRequester.GetResponse <int>($"{BaseUrl}/GetSteamLevel/v1?key={apiKey}&steamid={steamID}", "response", "player_level"));
 }