Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(plugins/steam): add support for free games #1634

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions action.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions source/plugins/steam/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@ All product and company names are trademarks™ or registered® trademarks of th
<br>
<b>default:</b> 2<br></td>
</tr>
<tr>
<td nowrap="nowrap"><h4><code>plugin_steam_freegames</code></h4></td>
<td rowspan="2"><p>Include free games</p>
<img width="900" height="1" alt=""></td>
</tr>
<tr>
<td nowrap="nowrap"><b>type:</b> <code>boolean</code>
<br>
<b>default:</b> no<br></td>
</tr>
</table>
<!--/options-->

Expand Down
4 changes: 2 additions & 2 deletions source/plugins/steam/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ export default async function({login, q, imports, data, account}, {token, enable
return null

//Load inputs
let {user, sections, "games.ignored": _games_ignored, "games.limit": _games_limit, "recent.games.limit": _recent_games_limit, "achievements.limit": _achievements_limit, "playtime.threshold": _playtime_threshold} = imports.metadata.plugins.steam.inputs({data, account, q})
let {user, sections, "games.ignored": _games_ignored, "games.limit": _games_limit, "recent.games.limit": _recent_games_limit, "achievements.limit": _achievements_limit, "playtime.threshold": _playtime_threshold, freegames} = imports.metadata.plugins.steam.inputs({data, account, q})

const urls = {
games: {
owned: `https://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=${token}&steamid=${user}&format=json&include_appinfo=1`,
owned: `https://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?key=${token}&steamid=${user}&format=json&include_appinfo=1&include_played_free_games=${freegames ? '1' : '0'}`,
schema: `https://api.steampowered.com/ISteamUserStats/GetSchemaForGame/v0002/?key=${token}&format=json`,
details: "https://store.steampowered.com/api/appdetails?",
},
Expand Down
5 changes: 5 additions & 0 deletions source/plugins/steam/metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,8 @@ inputs:
min: 0
default: 2

plugin_steam_freegames:
description: |
Include free games
type: boolean
default: no
Loading