User

getLastOnline

This method does not require authorization.

This method gives you the last online date of a specified user.

Example code: (Gets Roblox's last online date)

client.user:getLastOnline(1):andThen(function(date)
    print(date);
end):catch(warn)

Arguments:

TypeName

integer

userId

Returns:

<array>, example:

{
    ["IsOnline"] = false,
    ["LastLocation"] = "Offline",
    ["LastOnline"] = "2006-02-27T15:06:40.3-06:00",
    ["ParsedLastOnline"] = {
        ["day"] = "27",
        ["hour"] = "15",
        ["minute"] = "06",
        ["month"] = "02",
        ["second"] = "40",
        ["year"] = "2006"
    },
    ["PresenceType"] = 0,
    ["Visibility"] = 0,
    ["VisitorId"] = 1
}

The "ParsedLastOnline" is not included with the standard web API, it is parsed after the request using the module.

getInformation

This method does not require authorization.

This method returns information found on a specified player's profile like their account creation date, description, ban status, display name, and username.

Sample code: (gets Roblox's info)

client.user:getInformation(1):andThen(function(information)
    print(information);
end):catch(warn)

Arguments:

TypeName

integer

userId

Returns:

<array>, example:

{
    ["description"] = "hi",
    ["created"] = "2021-10-12T07:22:28.849Z",
    ["createdParsed"] = {
        ["month"] = 12,
        ["day"] = 2,
        ["year"] = 2001,
        ["hour"] = 1,
        ["second"] = 15
    },
    ["isBanned"] = false,
    ["externalAppDisplayName"] = "user",
    ["id"] = 69,
    ["name"] = "nice",
    ["displayName"] = "user"
}

getPastUsernames

This method does not require authorization.

This method returns a page object representing the specified user's past usernames. If you do not know how to use pages, I'd recommend checking out the page below.

pageIntroduction to Pages

Sample code: (getting my past usernames)

client.user:getPastUsernames(87424828):andThen(function(pastUsernames)
--> :flushed:
end):catch(warn)

Arguments:

TypeName

integer

userId

Returns: <page object>

searchUsers

This method does not require authorization.

This method returns a page object representing you searching for specified users, if you don't know how to use page objects check out the page below!

pageIntroduction to Pages

Sample code: (Searching for Roblox)

client.user:searchUsers("Roblox"):andThen(function(userResults)
--> :flushed:
end):catch(warn)

Arguments:

TypeName

string

search query

Returns: <page object>

Last updated