Can anyone tell me how to use this api new method

Handle problems or report system bug
shrmaprem0202
Posts: 38
Joined: Tue Mar 07, 2023 7:13 pm
Contact:

Can anyone tell me how to use this api new method

Post by shrmaprem0202 »

Code: Select all

<script>
local html = [=[
<tr><td width="23%" align="left" valign="top" margin="auto">
<img src="%thumb%" title="%name%" name="%name%" alt="%name%" width="65" height="56" style="border-radius:2px;"/>
<br/></td><td align="left"><a href="/download/%id%/%name|slug%"><b>%name%.%format%</b></a><br/>
<b><font color="gold">Size:</font></b> %size%<br/><b><font color="gold">Upload at: </font> </b> %date|date%</td></tr>
<tr><td colspan="2" align="left"><div style="background:#444;border-top: 1px solid #505050;padding:3px 0px 3px 6px;margin:0px 0px 0px 0px;">
<font color="gold"><b> Category:</b> </font> 
  <a href="/category/%dir%/%dirname|slug%" style="color:#ddd"><b>%dirname%</b></a> </div>
</td></tr>
]=]

local param = {
    limit = 10, 
    order = "id_desc"
}

local users = userinfo(param) 


print(users); 
</script>
User avatar
Xkria-uy
Posts: 122
Joined: Fri Apr 07, 2023 9:27 pm
Location: Uruguay
Contact:

Re: Can anyone tell me how to use this api new method

Post by Xkria-uy »

buena pregunta, el script funciona, como muestra resultados es un orror 🥴

Code: Select all

local html = [=[ <tr><td width="23%" align="left" valign="top" margin="auto"> <img src="%thumb%" title="%name%" name="%name%" alt="%name%" width="65" height="56" style="border-radius:2px;"> <br></td><td align="left"><a href="/download/%id%/%name|slug%"><b>%name%.%format%</b></a><br> <b><font color="gold">Size:</font></b> %size%<br><b><font color="gold">Upload at: </font> </b> %date|date%</td></tr><tr><td colspan="2" align="left"><div style="background:#444;border-top: 1px solid #505050;padding:3px 0px 3px 6px;margin:0px 0px 0px 0px;"> <font color="gold"><b> Category:</b> </font> <a href="/category/%dir%/%dirname|slug%" style="color:#ddd"><b>%dirname%</b></a> </div></td></tr> ]=] local param = {limit = 10, order = "id_desc"} local users = userinfo(param) print(users);
("ok": true, "result": { "1": { "type": 1, "point": 0, "id": 200498, "email": "lucia@hotmail.com", "username": "Lucia7", "useragent": "Mozilla/5.0 (Linux; Android 9; 5001A Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/119.0.6045.163 Mobile Safari/537.36", "var": { "gender": "Femenino" }, "logindate": "2023-11-24 08:23:32", "role": 1, "ip": "190.132.227.211", "regdate": "2023-11-24 08:23:32", "is_online": false }, "2": { "type": 1, "point": 0, "id": 200497, "email": "juanu@hotmail.com", "username": "juan15", "useragent": "Mozilla/5.0 (Linux; Android 9; 5001A Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/119.0.6045.163 Mobile Safari/537.36", "var": { "gender": "Masculino" }, "logindate": "2023-11-24 08:05:33", "role": 1, "ip": "190.132.227.211", "regdate": "2023-11-24 08:04:44", "is_online": false }, "3": { "type": 1, "point": 0, "id": 200496, "email": "juan@hotmail.com", "username": "juan5", "useragent": "Mozilla/5.0 (Linux; Android 9; 5001A Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/119.0.6045.163 Mobile Safari/537.36", "var": { "gender": "Masculino" }, "logindate": "2023-11-24 07:53:46", "role": 1, "ip": "190.132.227.211", "regdate": "2023-11-24 07:53:46", "is_online": false }, "4": { "type": 1, "point": 0, "id": 198382, "email": "domino@gmail.com", "username": "dominion", "useragent": "Opera/9.80 (Android; Opera Mini/7.6.40234/191.320; U; en) Presto/2.12.423 Version/12.16", "var": { "point": 100, "gender": "Male" }, "logindate": "2023-10-10 15:35:02", "role": 1, "ip": "102.88.35.136", "regdate": "2023-10-10 15:34:38", "is_online": false }, "5": { "type": 1, "point": 0, "id": 196974, "email": "lolo@hotmail.com", "username": "lolo543689", "useragent": "Opera/9.80 (Android; Opera Mini/73.0.2254/191.315; U; es) Presto/2.12.423 Version/12.16", "var": { "point": 100, "gender": "Male" }, "logindate": "2023-09-11 18:44:32", "role": 1, "ip": "179.28.231.91", "regdate": "2023-09-11 08:34:33", "is_online": false }, "6": { "type": 1, "point": 0, "id": 196433, "email": "amenarokamoni@gmail.com", "username": "Saitama", "useragent": "Mozilla/5.0 (Linux; Android 7.0; Tecno A88 Build/LMY47V; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.121 Mobile Safari/537.36,appysite", "var": { "point": 100 }, "logindate": "2023-08-26 14:14:59", "role": 1, "ip": "102.89.44.112", "regdate": "2023-08-26 14:14:38", "is_online": false }, "7": { "type": 1, "point": 0, "id": 196012, "email": "jas@hotmail.com", "username": "jaskeil", "useragent": "Mozilla/5.0 (Linux; Android 9; 5001A) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.5735.196 Mobile Safari/537.36 OPR/76.2.4027.73374", "var": { "point": 100 }, "logindate": "2023-08-14 10:11:56", "role": 1, "ip": "77.111.245.14", "regdate": "2023-08-14 10:11:56", "is_online": false }, "8": { "type": 1, "point": 0, "id": 195888, "email": "pikachu.bhar@gmail.com", "username": "Bharat", "useragent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36", "var": { "point": 100 }, "logindate": "2023-08-10 10:38:03", "role": 1, "ip": "223.176.114.245", "regdate": "2023-08-10 10:37:41", "is_online": false }, "9": { "type": 1, "point": 0, "id": 195887, "email": "Bharat.Sa@Outlook.com", "username": "Bharatsa", "useragent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Mobile Safari/537.36", "var": { "point": 100 }, "logindate": "2023-08-10 10:36:23", "role": 1, "ip": "223.176.114.245", "regdate": "2023-08-10 10:36:23", "is_online": false }, "0": { "type": 1, "point": 0, "id": 202763, "email": "Alraqueplus@gmail.com", "username": "Alraqueplus", "useragent": "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Mobile Safari/537.36", "logindate": "2024-01-21 03:08:40", "role": 1, "ip": "154.97.229.197", "regdate": "2024-01-21 03:07:14", "is_online": false } }, "info": { "total": 26, "count": 10, "pagenum": 3 } }
shrmaprem0202
Posts: 38
Joined: Tue Mar 07, 2023 7:13 pm
Contact:

Re: Can anyone tell me how to use this api new method

Post by shrmaprem0202 »

Where i put this code to see this result
User avatar
Xkria-uy
Posts: 122
Joined: Fri Apr 07, 2023 9:27 pm
Location: Uruguay
Contact:

Re: Can anyone tell me how to use this api new method

Post by Xkria-uy »

shrmaprem0202 wrote: Sat Feb 03, 2024 5:53 am Where i put this code to see this result
en Advanced function script
no utilice etiqueta <script>
shrmaprem0202
Posts: 38
Joined: Tue Mar 07, 2023 7:13 pm
Contact:

Re: Can anyone tell me how to use this api new method

Post by shrmaprem0202 »

Not working 🚫
User avatar
Xkria-uy
Posts: 122
Joined: Fri Apr 07, 2023 9:27 pm
Location: Uruguay
Contact:

Re: Can anyone tell me how to use this api new method

Post by Xkria-uy »

shrmaprem0202 wrote: Sat Feb 03, 2024 4:20 pm Not working 🚫

en este momento no está funcionando

string "Script #1481909"]:1: attempt to call global 'userinfo' (a nil value)
User avatar
francisco
Posts: 62
Joined: Tue Mar 07, 2023 1:48 pm
Location: Brazil
Contact:

Re: Can anyone tell me how to use this api new method

Post by francisco »

Hey guys!
For some reason Admin changed the way to call the functions, now it is api.method_name. Here's an example of using api.user_info to list registered users:

Code: Select all

local tags = [=[
<div class="user-line">
<a href="/user/%id%/%username%"><b>%username%</b></a><br>
<i>Registered: %regdate%</i>
</div>
]=]

local param = {
    limit = 10,
    order = "id_desc"
}

local is_ok, list = api.user_info(param)


if is_ok then
    print('\n<div class="user-list">\n')
    print(html.render_tag(tags, list, true))
    print('\n</div>\n')
end
New method names:

Code: Select all

api
	data_create
	data_edit
	data_info
	data_table_create
	data_table_edit
	data_table_info
	file_create
	file_edit
	file_info
	folder_create
	folder_edit
	folder_info
	forum_create
	forum_edit
	forum_info
	getme
	logout
	message_create
	message_edit
	message_info
	post_create
	post_edit
	post_info
	user_create
	user_edit
	user_info
	user_login
	user_online
	youtube_api
😴
User avatar
Xkria-uy
Posts: 122
Joined: Fri Apr 07, 2023 9:27 pm
Location: Uruguay
Contact:

Re: Can anyone tell me how to use this api new method

Post by Xkria-uy »

excelente, maestro @francisco.
quizás mejore lo que soporta, con el tiempo
on
on
Screenshot_20240203-170907.png (33.73 KiB) Viewed 39283 times
on
on
Screenshot_20240203-170907.png (33.73 KiB) Viewed 39283 times
Attachments
on
on
Screenshot_20240203-172348.png (21.73 KiB) Viewed 39280 times
shrmaprem0202
Posts: 38
Joined: Tue Mar 07, 2023 7:13 pm
Contact:

Re: Can anyone tell me how to use this api new method

Post by shrmaprem0202 »

I don't know why but it's still not working 🚫
User avatar
francisco
Posts: 62
Joined: Tue Mar 07, 2023 1:48 pm
Location: Brazil
Contact:

Re: Can anyone tell me how to use this api new method

Post by francisco »

shrmaprem0202 wrote: Sun Feb 04, 2024 5:25 am I don't know why but it's still not working 🚫
What error are you getting?
😴
Post Reply