User Tools

Site Tools


scripting:restcontext

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
scripting:restcontext [2022/08/25 14:35] – created jerryhopperscripting:restcontext [2022/08/25 15:03] (current) jerryhopper
Line 1: Line 1:
-====== RestApi======+====== RestContext ======
  
 **Class:** RestContext **Class:** RestContext
Line 14: Line 14:
 ===== Common usage ===== ===== Common usage =====
  
-The baseworld component is returned on the GetWorld() global command. +The restAPI allows interaction with external webresources in JSON format.
- +
-Typical usage : [[scripting:baseworld#findentitybyname|find an Entity]].  +
- +
-  GetWorld().FindEntityByName( string entity-name ) +
  
 +Typical usage : statistics/leaderboards/persistent world. 
  
 --- ---
Line 39: Line 35:
  
 Return type: [[scripting:datatypes#string]] Return type: [[scripting:datatypes#string]]
 +
 +
 +
 +
 +==== FILE(); ====
 +
 +  FILE(RestCallback cb, string request, string filename);
 +
 +Return type: [[scripting:datatypes#int]]
 +
 +
 +==== FILE_now(); ====
 +
 +  FILE_now( string request,string filename);
 +
 +Return type: [[scripting:datatypes#string]]
 +
 +
 +
 +
 +==== POST(); ====
 +
 +  POST(RestCallback cb, string request,string data);
 +
 +Return type: [[scripting:datatypes#int]]
 +
 +
 +==== POST_now(); ====
 +
 +  POST_now( string request,string data);
 +
 +Return type: [[scripting:datatypes#string]]
 +
 +
 +==== reset(); ====
 +
 +  reset(); 
 +  
 +Return type: [[scripting:datatypes#void]]
  
  
scripting/restcontext.1661434548.txt.gz · Last modified: 2022/08/25 14:35 by jerryhopper

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki