aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bridges/SteamAppNewsBridge.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/bridges/SteamAppNewsBridge.php b/bridges/SteamAppNewsBridge.php
index 3eedc4ab..085e6978 100644
--- a/bridges/SteamAppNewsBridge.php
+++ b/bridges/SteamAppNewsBridge.php
@@ -27,18 +27,26 @@ class SteamAppNewsBridge extends BridgeAbstract
'title' => '# of posts to retrieve (default 20)',
'type' => 'number',
'defaultValue' => 20
+ ],
+ 'tags' => [
+ 'name' => 'Tag Filter',
+ 'title' => 'Comma-separated list of tags to filter by',
+ 'type' => 'text',
+ 'exampleValue' => 'patchnotes'
]
]];
public function collectData()
{
- $api = 'https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/';
+ $apiTarget = 'https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/';
// Example with params: https://api.steampowered.com/ISteamNews/GetNewsForApp/v2/?appid=730&maxlength=0&count=20
// More info at dev docs https://partner.steamgames.com/doc/webapi/ISteamNews
- $url = $api . '?appid='
- . $this->getInput('appid') . '&maxlength='
- . $this->getInput('maxlength') . '&count='
- . $this->getInput('count');
+ $url =
+ $apiTarget
+ . '?appid=' . $this->getInput('appid')
+ . '&maxlength=' . $this->getInput('maxlength')
+ . '&count=' . $this->getInput('count')
+ . '&tags=' . $this->getInput('tags');
// Get the JSON content
$json = getContents($url);