-
-
Notifications
You must be signed in to change notification settings - Fork 129
CSteamGroup
A class which stands for a Steam group. This class cannot be instantiated directly; it must be received from a call to getSteamGroup
.
As of v3.5.0, if you don't want to bother with setting up a CSteamGroup
object, methods on this page marked with a non-object method name can be called directly on your SteamCommunity
instance, with the group's SteamID being the first parameter. For example:
var SteamCommunity = require('steamcommunity');
var community = new SteamCommunity();
community.getGroupMembers("103582791434202956", function(err, members) {
/* do something... */
});
A SteamID
object containing the group's SteamID. Visit a group at https://steamcommunity.com/gid/SteamID
The group's name (cannot be changed)
The group's URL (this can be changed). Visit a group at https://steamcommunity.com/groups/GROUPURL
The group's headline (this can be changed)
The group's summary content (this can be changed)
The hash of the group's avatar
How many members the group had when getSteamGroup
was called
How many group members were in group chat when getSteamGroup
was called
How many group members were in-game when getSteamGroup
was called
How many group members were online on Steam when getSteamGroup
was called
-
size
- What size to get the avatar at. Possible values arefull
,medium
, or empty (small). Default empty. -
protocol
- The protocol to use. Possible values forprotocol
arehttp://
,https://
, or//
(protocol aware). Defaulthttp://
.
Returns a URL where you can download this group's avatar.
-
addresses
- Optional. An array of IP addresses (inx.x.x.x
format) that will be rotated between when paging through the results. See below for details. -
callback
- Called when the member list is available-
err
-null
on success, anError
object on failure -
members
- An array ofSteamID
objects
-
Non-object method name: getGroupMembers
v3.5.0 or later is required to use the addresses
argument.
Retrieves a list of all users in this group. For large groups this could take around 30 seconds, possibly longer.
Steam returns at most 1000 users per page. Therefore, node-steamcommunity
will need to make ceil(totalMembers / 1000) HTTP requests to fulfill this request. steamcommunity.com will start rate-limiting us after around 60 requests. If you supply an array of IP addresses which are accessible to this machine as the addresses
argument, then node-steamcommunity
will rotate between them for each request.
Important: If using non-object methods, then you'll need to use differently-named methods depending on whether or not you want to use addresses
.
- To not use
addresses
:community.getGroupMembers(groupID, callback)
- To use
addresses
:community.getGroupMembersEx(groupID, addresses, callback)
-
callback
- Called when the request completes-
err
-null
on success, anError
object on failure
-
Non-object method name: joinGroup
Joins a group. If the group is restricted, requests to join.
-
callback
- Called when the request completes-
err
-null
on success, anError
object on failure
-
Non-object method name: leaveGroup
Leaves a group.
-
headline
- The title of the announcement -
content
- What the announcement says -
hidden
- Optional.true
to post this as a hidden announcement. Defaultfalse
. -
callback
- Called when the request completes-
err
-null
on success, anError
object on failure
-
Non-object method name: postGroupAnnouncement
Posts an announcement to a group, provided you have permission to do so.
-
name
- The event's name/headline -
type
- See below -
description
- A description for the event -
time
-null
to start it immediately, otherwise aDate
object representing a time in the future -
server
- If this is a game event (see below), this can be a string containing the game server's IP address or an object containingip
andpassword
properties. If not a game event, this should be null or undefined. -
callback
- Called when the request completes-
err
-null
on success, anError
object on failure
-
Non-object method name: scheduleGroupEvent
Schedules a new event for the group. type
can be one of the strings shown below, or an AppID to schedule a game-specific event.
-
ChatEvent
- Chat -
OtherEvent
- A lil somethin somethin -
PartyEvent
- Party! -
MeetingEvent
- Important meeting -
SpecialCauseEvent
- Special cause (charity ball?) -
MusicAndArtsEvent
- Music or Art type thing -
SportsEvent
- Sporting endeavor -
TripEvent
- Out of town excursion
-
id
- The 64-bit numeric ID of the event you want to edit (as a string) -
name
- The event's name/headline -
type
- See below -
description
- A description for the event -
time
-null
to start it immediately, otherwise aDate
object representing a time in the future -
server
- If this is a game event (see below), this can be a string containing the game server's IP address or an object containingip
andpassword
properties. If not a game event, this should be null or undefined. -
callback
- Called when the request completes-
err
-null
on success, anError
object on failure
-
Non-object method name: editGroupEvent
v3.20.0 or later is required to use this method
Edits an existing Steam group event. Parameters are identical to those in scheduleEvent
.
-
id
- The 64-bit numeric ID of the event you want to delete (as a string) -
callback
- Optional. Called when the request completes-
err
-null
on success, anError
object on failure
-
Non-object method name: deleteGroupEvent
v3.21.0 or later is required to use this method
Deletes an existing Steam group event.
-
steamID
- ASteamID
object representing the group's new Player of the Week -
callback
- Called when the request completes-
err
-null
on success, anError
object on failure -
oldPOTW
- ASteamID
representing the former Player of the Week -
newPOTW
- ASteamID
representing the new Player of the Week
-
Non-object method name: setGroupPlayerOfTheWeek
Changes the group's current Player of the Week.
-
steamID
- ASteamID
object representing the player to kick from the group -
callback
- Called when the request completes-
err
-null
on success, anError
object on failure
-
Non-object method name: kickGroupMember
Kicks a player from the group.
-
page
- The page of history that you're requesting, starting at 1 -
callback
- Called when requested data is available-
err
-null
on success, anError
object on failure -
history
- An object containing group history for this page-
first
- The index of the first history item on this page, starting at 1 -
last
- The index of the last history item on this page -
total
- How many total history items there are -
items
- An array of group history objects-
type
- A string containing the item history type. This is the type displayed on the history page, without spaces. For example,NewMember
,InviteSent
, etc. -
date
- ADate
object containing the date and time when this action took place. Since the history page doesn't display any years, the year could possibly be incorrect. -
user
- ASteamID
object containing the SteamID of the user who either performed or received this action. For example, onNewMember
this is the new group member, onInviteSent
this is the invite recipient, onNewAnnouncement
, this is the author -
actor
- Not present on all history types. This is the user who performed the action ifuser
is the receipient of the action
-
-
-
Non-object method name: getGroupHistory
v3.5.0 or later is required to use this method.
Requests a page of group history (visible at https://steamcommunity.com/groups/yourgroup/history).
-
time
- Optional. ADate
object. If specified, only announcements posted after this time are returned. -
callback
- Called when requested data is available-
err
-null
on success, or anError
object on failure -
announcements
- An array of announcement objects-
headline
- The announcement's title -
content
- The content of the announcement -
date
- ADate
object for when this was posted -
author
- The Steam profile name of the author -
aid
- The ID of the announcement
-
-
**Non-object method name: getAllGroupAnnouncements
v3.18.0 or later is required to use this method.
Gets all announcements posted to the group.
-
announcementID
- The ID of the announcement, as a string -
headline
- The new title for the announcement -
content
- The new content for the announcement -
callback
- Optional. Called when the request completes.-
err
-null
on success, or anError
object on failure
-
Non-object method name: editGroupAnnouncement
v3.18.0 or later is required to use this method.
Edits an announcement in the group.
-
announcementID
- The ID of the announcement, as a string -
callback
- Optional. Called when the request completes.-
err
-null
on success, or anError
object on failure
-
Non-object method name: editGroupAnnouncement
v3.18.1 or later is required to use this method.
Deletes an announcement in the group.
-
callback
- Required. Called when the request completes.-
err
-null
on success, or anError
object on failure -
requests
- An array ofSteamID
objects, where each object represents a user who has requested to join the group
-
Non-object method name: getGroupJoinRequests
v3.32.0 or later is required to use this method.
Gets a listing of everyone who has requested to join this group. Is useless for non-restricted (i.e., public or invite-only) groups.
-
steamIDs
- An array of eitherSteamID
objects or strings that can parse intoSteamID
objects -
approve
- Eithertrue
to approve joining the group for these users, orfalse
to deny it -
callback
- Optional. Called when the request completes.-
err
-null
on success, or anError
object on failure
-
Non-object method name: respondToGroupJoinRequests
v3.32.0 or later is required to use this method.
Approves or denies joining the group for specific users who have requested to join. Those users must have an outstanding group-join request, and the group must be restricted.
-
approve
- Eithertrue
to approve joining the group for all who have requested it currently, orfalse
to deny it -
callback
- Optional. Called when the request completes.-
err
-null
on success, or anError
object on failure
-
Non-object method name: respondToAllGroupJoinRequests
v3.32.0 or later is required to use this method.
Approves or denies joining the group for all users who currently have outstanding join requests. Useless for non-restricted groups.
-
from
- The offset where you want to start. 0 to start with the first (most recent) comment -
count
- The number of comments you want to retrieve -
callback
- Called when the request completes.-
err
-null
on success, or anError
object on failure -
comments
- An array of comments. Each comment is an object containing these properties:-
authorName
- The comment author's persona name -
authorId
- Either the comment author's 64-bit Steam ID, or their vanity URL -
date
- ADate
object of when this comment was submitted -
commentId
- The ID of this comment -
text
- The HTML content of this comment
-
-
**Non-object method name: getAllGroupComments
v3.34.0 or later is required to use this method
Gets a listing of comments in a Steam group.
-
commentID
- The ID of the comment you want to delete -
callback
- Optional. Called when the request completes.-
err
-null
on success, or anError
object on failure
-
**Non-object method name: deleteGroupComment
v3.34.0 or later is required to use this method
Deletes a comment in a Steam group, provided you have permission to do so (i.e. are the author or a group moderator/admin with the appropriate permission).