-
-
Notifications
You must be signed in to change notification settings - Fork 158
Family Sharing
v4.17.0 or later is required to use family sharing
This is currently experimental.
Methods and events for family sharing are available directly on a SteamUser instance. For example:
const SteamUser = require('steam-user');
let user = new SteamUser();
user.addAuthorizedBorrowers(...);
-
borrowersSteamID
- An array ofSteamID
objects or strings which can parse into them -
callback
- Optional. Called when the request completes.-
err
- AnError
object on failure ornull
on success
-
Adds one or more Steam accounts as authorized borrowers of your library.
-
borrowersSteamID
- An array ofSteamID
objects or strings which can parse into them -
callback
- Optional. Called when the request completes.-
err
- AnError
object on failure ornull
on success
-
Removes one or more Steam accounts as authorized borrowers of your library.
-
options
- Optional. An object with zero or more of these properties:-
includeCanceled
- Unclear what this does (defaultfalse
) -
includePending
- Include borrowers who have requested authorization but haven't been approved (defaultfalse
)
-
-
callback
- Called when the request completes.-
err
- AnError
object on failure ornull
on success -
response
- The response object-
borrowers
- An array of objects with these properties:-
steamid
- ASteamID
object for the authorized borrower -
isPending
- Bool -
isCanceled
- Bool -
timeCreated
- ADate
object
-
-
-
Retrieves a list of Steam accounts that are authorized to borrow your library.
-
options
- Optional. An object with zero or more of these properties:-
includeCanceled
- Unclear what this does (defaultfalse
)
-
-
callback
- Called when the request completes.-
err
- AnError
object on failure ornull
on success -
response
- The response object-
devices
- An array of objects with these properties:-
deviceToken
- String -
deviceName
- String -
isPending
- Bool -
isCanceled
- Bool -
isLimited
- Bool -
lastTimeUsed
- ADate
object ornull
if not applicable -
lastBorrower
- ASteamID
object ornull
if not applicable -
lastAppPlayed
- Number. The AppID of the last app played on this device ornull
if not applicable
-
-
-
Retrieves a list of devices that are authorized to share your library.
-
deviceName
- A string containing this device's name -
callback
- Optional. Called when the request completes.-
err
- AnError
object on failure ornull
on success -
response
- The response object-
deviceToken
- The newly-authorize device's sharing device token
-
-
Authorizes the local device for family sharing. How "local device" is defined is presently unknown, and should be explored.
-
deviceToken
- Either a string containing the device token of the device you want to deauthorize, or an object containing adeviceToken
property -
callback
- Optional. Called when the request completes.-
err
- AnError
object on failure ornull
on success
-
Deauthorizes a device for family sharing.
-
ownerSteamID
- Either aSteamID
object or a string which can parse into one -
deviceToken
- String containing the device token you want to activate
Activates a sharing authorization on the local machine. If this succeeds, the licenses
event will be emitted containing
both your directly-owned licenses and the licenses you have received from this family sharing authorization. Licenses
obtained from sharing will have their owner_id
property equal to the SteamID accountid of the account which owns
the license.
Deactivates all sharing authorizations that have been activated using activateSharingAuthorization()
. After calling
this method, if any shared licenses were previously available, the licenses
event will be emitted without those shared
licenses.