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:32] – [GetContext();] 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 32: Line 32:
  
 Return type: [[scripting:restcontext]] Return type: [[scripting:restcontext]]
 +
 +
 +
 +==== GetContextCount(); ====
 +
 +  GetContextCount(string serverURL);;
 +
 +Return type: [[scripting:int]]
 +
 +
 +
 +
 +==== DebugList(); ====
 +
 +  DebugList();
 +
 +Return type: [[scripting:void]]
  
  
scripting/restapi.1661434363.txt.gz · Last modified: 2022/08/25 14:32 by jerryhopper

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki