Game

This page has methods that include things like creating developer products and getting game information. The page below introduces you to "promises" which is what is used to handle success and errors with the API.

createDeveloperProduct

This method requires authorization

This method has to make 3 separate HTTP requests and can take multiple seconds. Keep this in mind if you're for some reason making multiple developer products.

This method creates a developer product in the specified game (as long as you have permissions to it)

Sample code:

client.game:createDeveloperProduct(7713167711,{
    name = "testing product",
    description = "hello world",
    price = 30
}):andThen(function(developerProduct)
    print(developerProduct.productId); --> 1211770410
end):catch(warn)

Arguments:

Returns: (an example of a successful return in the code above)

{
    name = "testing product",
    description = "hello world",
    price = 30,
    productId = 1211770410
}

getGameInformation

This method does not require authorization.

This method returns an array of game information for the specified place.

Sample code:

client.game:getGameInformation(game.PlaceId):andThen(function(info)
    --> do something with this information
end):catch(warn)

Arguments:

Returns: <array> (example below is of my own game)

{
	["AssetGenre"] = "All",
	["AssetGenreViewModel"] = {
		["DisplayName"] = "All",
		["Id"] = 1
	},
	["AssetId"] = 7701425851,
	["Builder"] = "@Jumpathy",
	["BuilderAbsoluteUrl"] = "https://www.roblox.com/users/87424828/profile/",
	["BuilderId"] = 87424828,
	["Created"] = "10/10/2021",
	["Description"] = "",
	["FavoritedCount"] = 0,
	["IsCopyingAllowed"] = false,
	["IsFavoritedByUser"] = false,
	["IsFavoritesUnavailable"] = false,
	["IsPlayable"] = false,
	["MaxPlayers"] = 50,
	["Name"] = "Proxy Testing",
	["OnlineCount"] = 0,
	["OverridesDefaultAvatar"] = false,
	["PlayButtonType"] = "FancyButtons",
	["Price"] = 0,
	["ReasonProhibited"] = "AnonymousAccessProhibited",
	["ReasonProhibitedMessage"] = "Guest users are not allowed.",
	["ReportAbuseAbsoluteUrl"] = "https://www.roblox.com/abusereport/asset?id=7701425851&RedirectUrl=%2fgames%2f7701425851%2fProxy-Testing",
	["TotalDownVotes"] = 0,
	["TotalUpVotes"] = 0,
	["UniverseId"] = 2989575001,
	["UniverseRootPlaceId"] = 7701425851,
	["Updated"] = "10/11/2021",
	["Url"] = "https://www.roblox.com/games/7701425851/Proxy-Testing",
	["UsePortraitMode"] = false,
	["UserCanManagePlace"] = false,
	["VisitedCount"] = 0,
	["VoiceEnabled"] = false
};

updateDeveloperProduct

This method requires authorization

This method updates a specified developer product to the new information you want

Sample code:

client.game:updateDeveloperProduct(7642710810,1212015336,{
    ["name"] = "new",
    ["price"] = 300,
    ["description"] = "yoo"
}):catch(warn):andThen(print)

Arguments:

Returns: {}

getGamepasses

This method does not require authorization.

This method returns gamepasses of the specified game in a page format, if you don't know how to use pages you should check out the guide below.

Sample code:

client.game:getGamepasses(13822889):andThen(function(results)
    print(results:getCurrentPage())
end):catch(warn);

Arguments:

Returns: <page object>

Last updated