Client
Logging into Free Rider HD.
import
{Client
}from
"frhd"
;
const
client
=new
Client
();
client
.on
("ready"
,function
() {console
.log
("Ready!"
); });
client
.login
("your-token-goes-here"
);
Methods
import
{Events
}from
"frhd"
;
client
.on
(Events
.FriendRequestReceieved
,function
(challenge
) {console
.log
(challenge
); });
UserManager#fetch
Parameters:
String: Username
Response type: Object
client
.users
.fetch
("Guest"
).then
(function
(user
) {console
.log
(user
); });
TrackManager#fetch
Parameters:
Number: Track ID
Response type: Object
client
.tracks
.fetch
(1001
).then
(function
(track
) {console
.log
(track
); });
NotificationManager#fetch
Parameters:
Number: Count (number of notifications)
Response type: Object (Array)
client
.notifications
.fetch
(10
).then
(function
(notifications
) {console
.log
(notifications
); });