Hey there all of you developers! Today I have decided to share with you a little something I have thrown together in the hopes you will find it useful.
Allow me to present to you my module that allows to make requests to the ROBLOX catalog.
The module currently only features one method, :Search()
:Search() takes 4 arguments, Query, Category, Page Number and Sort Type.
Query is a string, it is what you are looking for, as is the same for most search engines!
Category is an integer, it is the type of item you are looking for.
[size=2][ul]
[li]1 is all items.[/li]
[li]2 is unknown currently.[/li]
[li]3 is all clothing.[/li]
[li]4 is all body parts.[/li]
[li]5 is all gear.[/li]
[li]6 is all models.[/li]
[li]7 is all plugins.[/li]
[li]8 is all decals.[/li]
[li]9 is all hats.[/li]
[li]10 is all faces.[/li]
[li]11 is all packages.[/li]
[li]12 is all shirts.[/li]
[li]13 is all t-shirts.[/li]
[li]14 is all pants.[/li]
[li]15 is all heads.[/li]
[li]16 is all audio.[/li]
[/ul][/size]
Page Number is an Integer, it is fairly self explanatory.
Sort Type is an integer, it is the way the items are sorted.
[size=2][ul]
[li]0 is relevance when not signed in.[/li]
[li]1 is most favorited.[/li]
[li]2 is best selling.[/li]
[li]3 is recently updated.[/li]
[li]4 is price low to high.[/li]
[li]5 is price high to low.[/li]
[/ul][/size]
Returns a table of asset IDs
{135245, 356722, 629424, 135625}
None of the arguments are required, all integers default to one, with a blank search query. Here is some example code of how to use the module. This code will search for decals of the ROBLOX logo on page one that have been updated most recently.
local catalog = require(186812187)
local results = catalog:Search("Roblox logo", 8, 1, 3)
for i = 1, #results do
-- Do something
end
Please be aware this requires HttpService and also uses my own site to work, please be considerate when using it.