Character Vault
Any Concept / Any System
Compendium
Your System Come To Life
Roll20 for Android
Streamlined for your Tablet
Roll20 for iPad
Streamlined for your Tablet

Personal tools

Difference between revisions of "Script:StateBrowser"

From Roll20 Wiki

Jump to: navigation, search
(tagged as "discontinued API")
(redirect to Script Index, API no longer available)
 
Line 1: Line 1:
{{script overview
+
#Redirect[[API:Script Index]]
 +
<!-- Don't delete redirect, help center links to this page even though API have been removed
 +
[[Category:Discontinued API Scripts]] -->
 +
 
 +
script overview
 
|name=StateBrowser
 
|name=StateBrowser
 
|author={{user profile|503018|manveti}}
 
|author={{user profile|503018|manveti}}
 
|version=0.1
 
|version=0.1
|lastmodified=2015-07-24}}
+
|lastmodified=2015-07-24
  
 
'''StateBrowser''' allows a user to view and modify properties of the state object.
 
'''StateBrowser''' allows a user to view and modify properties of the state object.
Line 11: Line 15:
  
 
=== Syntax ===
 
=== Syntax ===
 +
<!-- suppress category
 +
 
{{syntaxbox top|state|formal=true}}
 
{{syntaxbox top|state|formal=true}}
 
{{API command|state}} {{API parameter|name=options|optional=true}} {{API parameter|name=path|optional=true}} {{API parameter|name=value|optional=true}}<br>
 
{{API command|state}} {{API parameter|name=options|optional=true}} {{API parameter|name=path|optional=true}} {{API parameter|name=value|optional=true}}<br>
Line 37: Line 43:
 
{{param description|name=value|value=Value to which to set object, in JSON.}}
 
{{param description|name=value|value=Value to which to set object, in JSON.}}
 
{{param description bottom}}
 
{{param description bottom}}
 
+
-->
 
=== Examples ===
 
=== Examples ===
  
Line 53: Line 59:
 
=== Changelog ===
 
=== Changelog ===
 
{{changelog version|0.1|2015-07-24|* Initial release}}
 
{{changelog version|0.1|2015-07-24|* Initial release}}
[[Category:Discontinued API Scripts]]
 

Latest revision as of 19:57, 20 September 2021

  1. RedirectAPI:Script Index

script overview |name=StateBrowser |author=manveti |version=0.1 |lastmodified=2015-07-24

StateBrowser allows a user to view and modify properties of the state object.

It is recommended that this script be used in conjunction with the CommandShell module, which will improve output formatting and command discovery, and will allow whitespace to be preserved in property values.


[edit] Syntax

[edit] Examples

!state foo.bar
Displays the value of state.foo.bar, assuming it exists. If state.foo.bar does not exist, an error will be generated.
!state -s foo.bar "{'blah': 'bloh'}"
Sets state.foo.bar to an object with a single property: "blah", with value "bloh", assuming that state.foo.bar exists. If state.foo.bar does not exist, an error will be generated.
!state -s foo.bar.baz 42
Sets state.foo.bar.baz to 42. If state.foo.bar didn't already exist, it will now be {'baz': 42}.
!state -d foo.bar
If state.foo.bar exists, prompts the user to confirm deletion. Then (if the user clicks the button to confirm) deletes state.foo.bar. If state.foo.bar does not exist, an error will be generated.
!state -D foo.bar
Immediately deletes state.foo.bar if it exists. If it does not exist, an error will be generated.

[edit] Changelog

v0.1 (2015-07-24)

  • Initial release