blob: 880a2516f1357ae40d453730af5ca335b78d83d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
local leap = require 'leap'
local mapargs = require 'mapargs'
local LLInventory = {}
-- Get the items/folders info by provided IDs,
-- reply will contain "items" and "categories" tables accordingly
function LLInventory.getItemsInfo(items_id)
return leap.request('LLInventory', {op = 'getItemsInfo', items_id=items_id})
end
-- Get the table of folder type names, which can be later used to get the ID of the basic folders
function LLInventory.getFolderTypeNames()
return leap.request('LLInventory', {op = 'getFolderTypeNames'}).type_names
end
-- Get the UUID of the basic folder("Textures", "My outfits", "Sounds" etc.) by specified folder type name
function LLInventory.getBasicFolderID(ft_name)
return leap.request('LLInventory', {op = 'getBasicFolderID', ft_name=ft_name}).id
end
-- Get the direct descendents of the 'folder_id' provided,
-- reply will contain "items" and "categories" tables accordingly
function LLInventory.getDirectDescendents(folder_id)
return leap.request('LLInventory', {op = 'getDirectDescendents', folder_id=folder_id})
end
return LLInventory
|