2023-10-03 16:11:25 +00:00
|
|
|
import "pkg:/source/api/Image.bs"
|
|
|
|
import "pkg:/source/utils/config.bs"
|
|
|
|
import "pkg:/source/api/baserequest.bs"
|
2023-11-13 14:16:00 +00:00
|
|
|
import "pkg:/source/utils/misc.bs"
|
2023-05-03 21:21:04 +00:00
|
|
|
|
2022-02-06 15:37:02 +00:00
|
|
|
sub init()
|
|
|
|
m.top.functionName = "loadItems"
|
|
|
|
end sub
|
|
|
|
|
|
|
|
sub loadItems()
|
2023-11-13 14:16:00 +00:00
|
|
|
params = {
|
|
|
|
maxHeight: 1080,
|
|
|
|
maxWidth: 1920
|
|
|
|
}
|
|
|
|
|
|
|
|
if isValid(m.top.itemNodeContent)
|
|
|
|
item = m.top.itemNodeContent
|
|
|
|
m.top.results = ImageURL(item.Id, "Primary", params)
|
|
|
|
else if isValid(m.top.itemArrayContent)
|
|
|
|
item = m.top.itemArrayContent
|
2022-02-06 15:37:02 +00:00
|
|
|
m.top.results = ImageURL(item.Id, "Primary", params)
|
|
|
|
else
|
|
|
|
m.top.results = invalid
|
|
|
|
end if
|
2023-11-13 14:16:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-06 15:37:02 +00:00
|
|
|
end sub
|