User Tools

Site Tools


scripting:restapi

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripting:restapi [2022/08/25 14:28] jerryhopperscripting:restapi [2022/08/25 15:35] (current) jerryhopper
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]]+Typical usage : statistics/leaderboards/persistent world
  
-  GetWorld().FindEntityByNamestring entity-name )+  GetGame().GetRestApi().GetContext("https://some.url");
  
  
Line 31: Line 31:
   GetContext(string serverURL);;   GetContext(string serverURL);;
  
-Return type: [[scripting:datatypes#RestContext]]+Return type: [[scripting:restcontext]] 
 + 
 + 
 + 
 +==== GetContextCount(); ==== 
 + 
 +  GetContextCount(string serverURL);; 
 + 
 +Return type: [[scripting:int]] 
 + 
 + 
 + 
 + 
 +==== DebugList(); ==== 
 + 
 +  DebugList(); 
 + 
 +Return type: [[scripting:void]]
  
  
scripting/restapi.1661434094.txt.gz · Last modified: 2022/08/25 14:28 by jerryhopper

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki