Back to Metrics

README

source/plugins/steam/README.md

3.345.9 KB
Original Source
<!--header--> <table> <tr><td colspan="2"><a href="/README.md#-plugins">← Back to plugins index</a></td></tr> <tr><th colspan="2"><h3>🕹️ Steam</h3></th></tr> <tr><td colspan="2" align="center"><p>This plugin can display your player profile and played games from your Steam account.</p> </td></tr> <tr><th>⚠️ Disclaimer</th><td><p>This plugin is not affiliated, associated, authorized, endorsed by, or in any way officially connected with <a href="https://store.steampowered.com">Steam</a>. All product and company names are trademarks™ or registered® trademarks of their respective holders.</p> </td></tr> <tr> <th rowspan="3">Supported features <sub><a href="metadata.yml">→ Full specification</a></sub></th> <td><a href="/source/templates/classic/README.md"><code>📗 Classic template</code></a></td> </tr> <tr> <td><code>👤 Users</code> <code>👥 Organizations</code></td> </tr> <tr> <td><code>🗝️ plugin_steam_token</code></td> </tr> <tr> <td colspan="2" align="center"> <details open><summary>Recently played games</summary></img></details> <details><summary>Profile and detailed game history</summary></img></details>
</td>
</tr> </table> <!--/header-->

➡️ Available options

<!--options--> <table> <tr> <td align="center" nowrap="nowrap">Option</i></td><td align="center" nowrap="nowrap">Description</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_steam</code></h4></td> <td rowspan="2"><p>Enable steam plugin</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>boolean</code>

<b>default:</b> no

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_steam_token</code></h4></td> <td rowspan="2"><p>Steam token</p> </td> </tr> <tr> <td nowrap="nowrap">🔐 Token

🌐 Web instances must configure <code>settings.json</code>:

<ul> <li><i>metrics.api.steam</i></li> </ul> <b>type:</b> <code>token</code> </td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_steam_sections</code></h4></td> <td rowspan="2"><p>Displayed sections</p> <ul> <li><code>player</code>: display profile</li> <li><code>most-played</code>: display most played games</li> <li><code>recently-played</code>: display recently played games</li> </ul> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>array</code> <i>(comma-separated)</i>

<b>default:</b> player, most-played, recently-played

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_steam_user</code></h4></td> <td rowspan="2"><p>Steam user id</p> <p>This can be found on your Steam user account details</p> </td> </tr> <tr> <td nowrap="nowrap">⏯️ Cannot be preset

<b>type:</b> <code>string</code>

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_steam_games_ignored</code></h4></td> <td rowspan="2"><p>Ignored games</p> <p>Use App id as they are referenced in Steam catalog</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>array</code> <i>(comma-separated)</i> </td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_steam_games_limit</code></h4></td> <td rowspan="2"><p>Display limit (Most played games)</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>number</code> <i>(0 ≤ 𝑥)</i>

<b>zero behaviour:</b> disable</br> <b>default:</b> 1

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_steam_recent_games_limit</code></h4></td> <td rowspan="2"><p>Display limit (Recently played games)</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>number</code> <i>(0 ≤ 𝑥)</i>

<b>zero behaviour:</b> disable</br> <b>default:</b> 1

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_steam_achievements_limit</code></h4></td> <td rowspan="2"><p>Display limit (Games achievements)</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>number</code> <i>(0 ≤ 𝑥)</i>

<b>default:</b> 2

</td> </tr> <tr> <td nowrap="nowrap"><h4><code>plugin_steam_playtime_threshold</code></h4></td> <td rowspan="2"><p>Display threshold (Game playtime in hours)</p> </td> </tr> <tr> <td nowrap="nowrap"><b>type:</b> <code>number</code> <i>(0 ≤ 𝑥)</i>

<b>default:</b> 2

</td> </tr> </table> <!--/options-->

🗝️ Obtaining a Steam Web API token

Go to steamcommunity.com/dev/apikey to obtain a Steam Web API token:

To retrieve your Steam ID, access your user account on store.steampowered.com/account and copy the identifier located behind the header:

ℹ️ Examples workflows

<!--examples-->
yaml
name: Recently played games
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.steam.svg
  token: NOT_NEEDED
  base: ""
  plugin_steam_token: ${{ secrets.STEAM_TOKEN }}
  plugin_steam: yes
  plugin_steam_user: "0"
  plugin_steam_sections: recently-played
  plugin_steam_achievements_limit: 0

yaml
name: Profile and detailed game history
uses: lowlighter/metrics@latest
with:
  filename: metrics.plugin.steam.full.svg
  token: NOT_NEEDED
  base: ""
  plugin_steam_token: ${{ secrets.STEAM_TOKEN }}
  plugin_steam: yes
  plugin_steam_user: "0"

<!--/examples-->