img_icon_url and img_logo_url Not Being Passed
rtizzy opened this issue · 2 comments
rtizzy commented
https://partner.steamgames.com/doc/webapi/IPlayerService#GetOwnedGames
The image URL is part of the API response when requesting owned games.
Example Code:
#!/usr/bin/env python
from steamapi import core, user
core.APIConnection(api_key="APIKEYHERE")
steam_user = user.SteamUser(userid=USERIDHERE)
name = steam_user.name
# List all the attributes
thestuff = dir(steam_user.games[0])
print(thestuff)
This will list the following:
python list_dict.py
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_cache', '_id', '_owner', '_schema', '_userid', 'achievements', 'appid', 'from_api_response', 'id', 'name', 'owner', 'playtime_forever']
Is there anyway to grab that part of the API response with smiley/steamapi?
rtizzy commented
As an example, you can also use this basic curl request.
export STEAM_API_KEY =
export STEAM_ID =
curl 'http://api.steampowered.com/IPlayerService/GetRecentlyPlayedGames/v1/?key=$STEAM_API_KEY&steamid=$STEAM_ID&format=json' | json_pp
Here is some truncated output
{
"response" : {
"games" : [
{
"appid" : 427520,
"img_logo_url" : "95e5aa627ae1481b1dea293f6db5954e8aa79f41",
"playtime_forever" : 1372,
"img_icon_url" : "267f5a89f36ab287e600a4e7d4e73d3d11f0fd7d",
"name" : "Factorio",
"playtime_2weeks" : 388
},
rtizzy commented
Pull request has been opened.
this is tested and working.