Show raw api
{
"functions": [
{
"name": "promiseAllStudioFriends",
"desc": "Returns the current studio users friends\n\n```lua\nFriendUtils.promiseAllStudioFriends()\n\t:Then(function(studioFriends)\n\t\tprint(studioFriends)\n\tend)\n```",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Promise<{ FriendData }>"
}
],
"function_type": "static",
"source": {
"line": 34,
"path": "src/friendutils/src/Shared/FriendUtils.lua"
}
},
{
"name": "onlineFriends",
"desc": "Outputs a list of only online friends",
"params": [
{
"name": "friends",
"desc": "",
"lua_type": "{ FriendData }"
}
],
"returns": [
{
"desc": "",
"lua_type": "{ FriendData }"
}
],
"function_type": "static",
"source": {
"line": 44,
"path": "src/friendutils/src/Shared/FriendUtils.lua"
}
},
{
"name": "friendsNotInGame",
"desc": "Outputs a list of only friends not in game",
"params": [
{
"name": "friends",
"desc": "",
"lua_type": "{ FriendData }"
}
],
"returns": [
{
"desc": "",
"lua_type": "{ FriendData }"
}
],
"function_type": "static",
"source": {
"line": 59,
"path": "src/friendutils/src/Shared/FriendUtils.lua"
}
},
{
"name": "promiseAllFriends",
"desc": "Retrieves all friends.",
"params": [
{
"name": "userId",
"desc": "",
"lua_type": "number"
},
{
"name": "limitMaxFriends",
"desc": "Optional max friends",
"lua_type": "number?"
}
],
"returns": [
{
"desc": "",
"lua_type": "Promise<{ FriendData }>"
}
],
"function_type": "static",
"source": {
"line": 80,
"path": "src/friendutils/src/Shared/FriendUtils.lua"
}
},
{
"name": "promiseFriendPages",
"desc": "Wraps [Players.GetFriendsAsync]",
"params": [
{
"name": "userId",
"desc": "",
"lua_type": "number"
}
],
"returns": [
{
"desc": "",
"lua_type": "Promise<FriendPages>"
}
],
"function_type": "static",
"source": {
"line": 107,
"path": "src/friendutils/src/Shared/FriendUtils.lua"
}
},
{
"name": "iterateFriendsYielding",
"desc": "Iterates over the current FriendPage and returns the next page",
"params": [
{
"name": "pages",
"desc": "",
"lua_type": "FriendPages"
}
],
"returns": [
{
"desc": "Iterator",
"lua_type": "() => FrienData?"
}
],
"function_type": "static",
"source": {
"line": 130,
"path": "src/friendutils/src/Shared/FriendUtils.lua"
}
},
{
"name": "promiseStudioServiceUserId",
"desc": "Gets the current studio user's user id.\n\n:::tip\nConsider using [FriendUtils.promiseCurrentStudioUserId] if you want this code\nto work while the game is running or in team create. This is specific to [StudioService].\n:::",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Promise<number>"
}
],
"function_type": "static",
"source": {
"line": 160,
"path": "src/friendutils/src/Shared/FriendUtils.lua"
}
},
{
"name": "promiseCurrentStudioUserId",
"desc": "Gets the current studio user's user id.",
"params": [],
"returns": [
{
"desc": "",
"lua_type": "Promise<number>"
}
],
"function_type": "static",
"source": {
"line": 183,
"path": "src/friendutils/src/Shared/FriendUtils.lua"
}
}
],
"properties": [],
"types": [
{
"name": "FriendData",
"desc": "",
"fields": [
{
"name": "Id",
"lua_type": "number",
"desc": "The friend's UserId"
},
{
"name": "Username",
"lua_type": "string",
"desc": "The friend's username"
},
{
"name": "DisplayName",
"lua_type": "string",
"desc": "The display name of the friend."
},
{
"name": "IsOnline",
"lua_type": "bool",
"desc": "If the friend is currently online"
}
],
"source": {
"line": 22,
"path": "src/friendutils/src/Shared/FriendUtils.lua"
}
}
],
"name": "FriendUtils",
"desc": "Utlity functions to help find friends of a user. Also contains utility to make testing in studio easier.",
"source": {
"line": 5,
"path": "src/friendutils/src/Shared/FriendUtils.lua"
}
}