Skip to content

Commit

Permalink
IPublishedFileService php backend
Browse files Browse the repository at this point in the history
  • Loading branch information
a-sync committed Sep 10, 2023
1 parent a83ef02 commit b9ec825
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
3 changes: 1 addition & 2 deletions backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@ module.exports = async (req, res) => {
pl.includemetadata = true;
pl.strip_description_bbcode = true;
pl.includereactions = true;
re = await post('https://api.steampowered.com/' + api + '/v1/?', pl);
} else if (postData.api === 'collection') {
api = 'ISteamRemoteStorage/GetCollectionDetails';
pl.collectioncount = idList.length;
pl.publishedfileids = idList;
re = await post('https://api.steampowered.com/' + api + '/v1/?', pl);
} else throw new Error('Invalid api');

re = await post('https://api.steampowered.com/' + api + '/v1/?', pl);
}

res.writeHead(200, {
Expand Down
18 changes: 17 additions & 1 deletion backend/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,28 @@
} else {
$api = '';
$pl = [];
if ($postData['api'] === 'file') {
if ($postData['api'] === 'file1') {
$api = 'ISteamRemoteStorage/GetPublishedFileDetails';
$pl = [
'itemcount' => count($idList),
'publishedfileids' => $idList
];
} elseif ($postData['api'] === 'file') {
$api = 'IPublishedFileService/GetDetails';
$pl = [
'key' => getenv('STEAM_WEB_API_KEY'),
'appid' => 107410,
'publishedfileids' => $idList,
'includetags' => true,
'includeadditionalpreviews' => true,
'includechildren' => true,
'includekvtags' => true,
'includevotes' => true,
'short_description' => false,
'includemetadata' => true,
'strip_description_bbcode' => true,
'includereactions' => true
];
} elseif ($postData['api'] === 'collection') {
$api = 'ISteamRemoteStorage/GetCollectionDetails';
$pl = [
Expand Down

0 comments on commit b9ec825

Please sign in to comment.