Skip to content

[SteamAppNewsBridge] Add tags filter#3662

Merged
dvikan merged 1 commit intoRSS-Bridge:masterfrom
God-damnit-all:patch-1
Sep 11, 2023
Merged

[SteamAppNewsBridge] Add tags filter#3662
dvikan merged 1 commit intoRSS-Bridge:masterfrom
God-damnit-all:patch-1

Conversation

@God-damnit-all
Copy link
Contributor

@God-damnit-all God-damnit-all commented Sep 11, 2023

Adds a tag filter that retrieves newsitems entries containing the listed tag(s).

The most common use-case is for retrieving entries with the patchnotes tag.

This uses the currently undocumented tags parameter, which can be discovered through a GetSupportedAPIList query. It takes a comma-separated list as an argument, and it's allowed to be an empty string.

GetNewsForApp v2 entry via /ISteamWebAPIUtil/GetSupportedAPIList/v1/
{
  "name": "GetNewsForApp",
  "version": 2,
  "httpmethod": "GET",
  "parameters": [
    {
      "name": "appid",
      "type": "uint32",
      "optional": false,
      "description": "AppID to retrieve news for"
    },
    {
      "name": "maxlength",
      "type": "uint32",
      "optional": true,
      "description": "Maximum length for the content to return, if this is 0 the full content is returned, if it's less then a blurb is generated to fit."
    },
    {
      "name": "enddate",
      "type": "uint32",
      "optional": true,
      "description": "Retrieve posts earlier than this date (unix epoch timestamp)"
    },
    {
      "name": "count",
      "type": "uint32",
      "optional": true,
      "description": "# of posts to retrieve (default 20)"
    },
    {
      "name": "feeds",
      "type": "string",
      "optional": true,
      "description": "Comma-separated list of feed names to return news for"
    },
    {
      "name": "tags",
      "type": "string",
      "optional": true,
      "description": "Comma-separated list of tags to filter by (e.g. 'patchnodes')"
    }
  ]
}

I think the example in tags's description is supposed to be 'patchnotes', not 'patchnodes'.

Because I haven't been able to come across any news entries that have more than one tag, I refrained from making this bridge parameter the list type, as I felt that might suggest it utilizes an OR list rather than an AND list.

@github-actions
Copy link

github-actions bot commented Sep 11, 2023

Pull request artifacts

file last change
SteamAppNewsBridge-current-context1 2023-09-11, 01:18:28
SteamAppNewsBridge-pr-context1 2023-09-11, 01:18:28

@dvikan
Copy link
Contributor

dvikan commented Sep 11, 2023

some linter issues

Undocumented tags filter discovered through /ISteamWebAPIUtil/GetSupportedAPIList/v1/
e.g. /ISteamNews/GetNewsForApp/v2/?appid=1091500&tags=patchnotes
@God-damnit-all
Copy link
Contributor Author

@dvikan Apparently the nice spacing I put in to make the variable vales line up was a waste. I went ahead and removed it. Should be fine now.

@dvikan dvikan merged commit a9cf151 into RSS-Bridge:master Sep 11, 2023
@God-damnit-all
Copy link
Contributor Author

Apparently it doesn't like the newline after the variable statement, sorry about that.

dvikan pushed a commit to dvikan/rss-bridge that referenced this pull request Sep 13, 2023
Undocumented tags filter discovered through /ISteamWebAPIUtil/GetSupportedAPIList/v1/
e.g. /ISteamNews/GetNewsForApp/v2/?appid=1091500&tags=patchnotes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants