Pages
Pages : Instance
Overview
Pages ๊ฐ์ฒด๋ ๋๋์ ๋ฐ์ดํฐ๋ฅผ ์ฌ๋ฌ ํ์ด์ง๋ก ๋๋์ด ์ ๊ณตํ๊ธฐ ์ํด ์ฌ์ฉ๋ฉ๋๋ค.
๊ฐ ํ์ด์ง๋ ํค-๊ฐ ์์ด ์ ๋ ฌ๋ ๋ชฉ๋ก ํํ๋ก ๊ตฌ์ฑ๋ฉ๋๋ค.
Properties
IsFinished
bool
๋ง์ง๋ง ํ์ด์ง์ธ์ง ์ฌ๋ถ๋ฅผ ๋ฐํํฉ๋๋ค.
์ด๋ฅผ ํตํด ํ์ด์ง๋ฅผ ์ํํ ๋, ๋ค์ ํ์ด์ง ์์ฒญ์ด ๊ฐ๋ฅํ์ง ์ฌ๋ถ๋ฅผ ํ๋จํ ์ ์์ต๋๋ค.
Code Samples
local MarketplaceService = game:GetService("MarketplaceService")
local function Request_GetWorldProductsAsync()
local success, errorOrWorldProducts = pcall(function()
return MarketplaceService:GetWorldProductsAsync()
end)
if success then
local worldProducts = errorOrWorldProducts
while true do
local currentPage = worldProducts:GetCurrentPage()
-- ๋ง์ง๋ง ํ์ด์ง์ด๋ฉด ๋ฃจํ ํ์ถ
if worldProducts.IsFinished or currentPage == nil then
break
end
end
end
end
Methods
GetCurrentPage
ํ์ฌ ํ์ด์ง์ ํฌํจ๋ ๋ชจ๋ ํญ๋ชฉ์ ๋ฐํํฉ๋๋ค.
๋ฐํ๋ ํญ๋ชฉ๋ค์ ํค ๊ตฌ์กฐ๋ ํด๋น Pages ๊ฐ์ฒด๊ฐ ์ด๋ค ๋ฐ์ดํฐ์์ ์์ฑ๋์๋์ง์ ๋ฐ๋ผ ๋ฌ๋ผ์ง๋๋ค.
Parameters
Return
Array
ํ์ฌ ํ์ด์ง์ ๊ตฌ์ฑ๋ ์ ๋ณด์ ๋๋ค.
Code Samples
local MarketplaceService = game:GetService("MarketplaceService")
local function Request_GetWorldProductsAsync()
local success, errorOrWorldProducts = pcall(function()
return MarketplaceService:GetWorldProductsAsync()
end)
if success then
local worldProducts = errorOrWorldProducts
while true do
local currentPage = worldProducts:GetCurrentPage()
if currentPage ~= nil then
for _, productInfo in pairs(currentPage) do
print("World Product Name: " .. tostring(productInfo.Name))
end
end
end
end
end
AdvanceToNextPageAsync
Pages ๊ฐ์ฒด๋ฅผ ์ํํ๋ฉด์ ๋ค์ ํ์ด์ง๋ก ์ด๋ํฉ๋๋ค.
๋จ, ํ์ด์ง ์ ํ์ ๋จ์ ํ์ด์ง๊ฐ ์์ ๋๋ง ์ฒ๋ฆฌ๋ฉ๋๋ค.
Parameters
Return
void
Code Samples
local MarketplaceService = game:GetService("MarketplaceService")
local function Request_GetWorldProductsAsync()
local success, errorOrWorldProducts = pcall(function()
return MarketplaceService:GetWorldProductsAsync()
end)
if success then
local worldProducts = errorOrWorldProducts
while true do
local currentPage = worldProducts:GetCurrentPage()
-- ๋ง์ง๋ง ํ์ด์ง์ด๋ฉด ๋ฃจํ ํ์ถ
if worldProducts.IsFinished or currentPage == nil then
break
else
worldProducts:AdvanceToNextPageAsync()
end
end
end
end
Events
Last updated