Table of Contents
A class which represents a shared file on Steam, including artwork, screenshots, and guides. This class cannot be
instantiated directly; it must be received from a call to
getSteamSharedFile
.
Properties
id
The shared file's unique ID.
type
A value from the ESharedFileType enum.
You can compare values like this:
const SteamCommunity = require('steamcommunity');
let sharedFile = getSomeSharedFileSomehow();
if (sharedFile.type == SteamCommunity.ESharedFileType.Screenshot) {
console.log('This file is a screenshot');
}
appID
The ID of the Steam app to which this shared file belongs.
owner
A SteamID
object representing the account that owns this shared file.
fileSize
A string containing a human-readable representation of the size of the file, if applicable.
postDate
A Date
object representing the date and time when this file was posted.
resolution
A string containing a human-readable representation of the resolution of the file, if applicable.
uniqueVisitorsCount
A count of how many unique people have viewed this file.
favoritesCount
A count of how many people have favorited this file.
upvoteCountt
A count of how many people have voted this file up.
guideNumRatings
A count of how many people have rated this file, if the file is a guide.
isUpvoted
A bool indicating whether the logged-in account has upvoted this file.
isDownvoted
A bool indicating whether the logged-in account has downvoted this file.
Methods
favorite([callback])
callback
- Optional. Called when the request completes.err
- AnError
object on failure, ornull
on success
Adds this shared file to your favorites.
You can also call this directly on a SteamCommunity
instance, like so:
community.favoriteSharedFile(sharedFileId, fileAppId, callback);
unfavorite([callback])
callback
- Optional. Called when the request completes.err
- AnError
object on failure, ornull
on success
Removes this shared file from your favorites.
You can also call this directly on a SteamCommunity
instance, like so:
community.unfavoriteSharedFile(sharedFileId, fileAppId, callback);
comment(message[, callback])
message
- The message you want to post as a commentcallback
- Optional. Called when the request completes.err
- AnError
object on failure, ornull
on success
Posts a comment on this shared file.
You can also call this directly on a SteamCommunity
instance, like so:
community.postSharedFileComment(sharedFileOwnerSteamId, sharedFileId, message, callback);
deleteComment(cid[, callback])
cid
- The ID of the comment you want to deletecallback
- Optional. Called when the request completes.err
- AnError
object on failure, ornull
on success
Deletes a comment on this shared file, provided you have privilege to do so.
You can also call this directly on a SteamCommunity
instance, like so:
community.deleteSharedFileComment(sharedFileOwnerSteamId, sharedFileId, cid, callback);
subscribe([callback])
callback
- Optional. Called when the request completes.err
- AnError
object on failure, ornull
on success
Subscribes to this shared file's comment section.
You can also call this directly on a SteamCommunity
instance, like so:
community.subscribeSharedFileComments(sharedFileOwnerSteamId, sharedFileId, callback);
unsubscribe([callback])
callback
- Optional. Called when the request completes.err
- AnError
object on failure, ornull
on success
Unsubscribes from this shared file's comment section.
You can also call this directly on a SteamCommunity
instance, like so:
community.unsubscribeSharedFileComments(sharedFileOwnerSteamId, sharedFileId, callback);