You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The docs Scripting contains a reference to the posting.get_variable() method, but it doesn't look like this has been implemented (yet).
As a workaround, looks like we could use vars = posting.variables and process the dict returned.
e.g.
frompostingimportPostingimportjsondefsetup(posting: Posting) ->None:
auth_token="auth_token"# Capture the variables currently setvars=posting.variables# Check to see if auth token is setifnotauth_tokeninvars:
print(f"{auth_token} not found")
posting.set_variable(auth_token, "1234567890")
# Debug - dump the updated variablesvars=posting.variablesprint(f"Vars: {json.dumps(vars, sort_keys=True, indent=4)}")
# Debug to see the var is set.print(f"Auth: {vars[auth_token]}")
The text was updated successfully, but these errors were encountered:
The docs Scripting contains a reference to the
posting.get_variable()
method, but it doesn't look like this has been implemented (yet).As a workaround, looks like we could use
vars = posting.variables
and process the dict returned.e.g.
The text was updated successfully, but these errors were encountered: