m0veax Posted May 18, 2020 Report Share Posted May 18, 2020 I want to get number of played hours but idk how Quote Link to comment Share on other sites More sharing options...
Dr. McKay Posted May 18, 2020 Report Share Posted May 18, 2020 https://steamapi.xpaw.me/#IPlayerService/GetOwnedGames Quote Link to comment Share on other sites More sharing options...
4049_1572836826 Posted May 19, 2020 Report Share Posted May 19, 2020 var request = require("request"); var steamid = '76561197960934690'; var apikey = 'u api key'; request({ url: 'http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key='+apikey+'&steamid='+steamid+'&format=json&include_appinfo=1', json: true }, function (error, response, body) { // console.log(body.response.games); if (!error && response.statusCode === 200) { for (i = 0; i <= body.response.games.length; i++) { console.log(body.response.games[i].name + ' - ' + body.response.games[i].playtime_forever / 60 + ' hrs.') } } }) https://steamcommunity.com/dev/apikey Quote Link to comment Share on other sites More sharing options...
m0veax Posted May 19, 2020 Author Report Share Posted May 19, 2020 Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.