Put on your coding caps...
On Monday we rolled out several exciting new changes to the API Server. These changes include new features requested by sheet and script authors, speed upgrades, and general upgrades to the underlying NodeJS engine enabling new code features for script authors to use.
Sheet Worker Support for the API
The largest ‘new’ feature is the addition of Sheet Worker support for the API server. Several script authors requested that we add this feature to save time on their end so that they can re-use the same sheet worker code that already exists for character sheets on the API. That means that, for example, if your character sheet automatically calculates the Dex Modifier of your character based on the Dexterity, when the API sets the Dexterity the modifier will get calculated as well. Previously the API author would need to write API-specific code to make that happen which lead to many API scripts not interacting well with complicated character sheets.
We also worked with specific API script authors to make sure that this new piece of functionality works well in large games and those using very complicated sheets. (For some specific documentation, check out this forum post.)
Speed Improvements
We made several adjustments to the underlying API code so that findObjs() calls (among others) are as fast as possible. This should provide an overall speedup for all existing API scripts without any extra effort necessary on the part of the script authors. At this point the API is as fast as the average web client in performing most actions such as updating sheets, creating tokens, and more.
Upgrade to NodeJS v7.x
Finally, we upgraded the version of NodeJS that the API sandbox uses to the latest version. This is the core engine that powers API scripts, and by upgrading it we can provide the latest in Javascript coding techniques for script authors to use. There are no backward-incompatible changes produced by this upgrade for functionality that API scripts had access to, so existing scripts will continue to work fine. For more information on these specific features, you can check out http://node.green (we’re now on the 7.7x series).
Thanks to everyone who beta-tested these new features on the Dev server over the past couple months!