Class: Google::Apis::ScriptV1::ExecutionRequest
- Inherits:
-
Object
- Object
- Google::Apis::ScriptV1::ExecutionRequest
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/script_v1/classes.rb,
generated/google/apis/script_v1/representations.rb,
generated/google/apis/script_v1/representations.rb
Overview
A request to run the function in a script. The script is identified by the
specified script_id
. Executing a function on a script returns results
based on the implementation of the script.
Instance Attribute Summary collapse
-
#dev_mode ⇒ Boolean
(also: #dev_mode?)
If
true
and the user is an owner of the script, the script runs at the most recently saved version rather than the version deployed for use with the Apps Script API. -
#function ⇒ String
The name of the function to execute in the given script.
-
#parameters ⇒ Array<Object>
The parameters to be passed to the function being executed.
-
#session_state ⇒ String
For Android add-ons only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ExecutionRequest
constructor
A new instance of ExecutionRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ ExecutionRequest
Returns a new instance of ExecutionRequest
110 111 112 |
# File 'generated/google/apis/script_v1/classes.rb', line 110 def initialize(**args) update!(**args) end |
Instance Attribute Details
#dev_mode ⇒ Boolean Also known as: dev_mode?
If true
and the user is an owner of the script, the script runs at the
most recently saved version rather than the version deployed for use with
the Apps Script API. Optional; default is false
.
Corresponds to the JSON property devMode
77 78 79 |
# File 'generated/google/apis/script_v1/classes.rb', line 77 def dev_mode @dev_mode end |
#function ⇒ String
The name of the function to execute in the given script. The name does not
include parentheses or parameters.
Corresponds to the JSON property function
84 85 86 |
# File 'generated/google/apis/script_v1/classes.rb', line 84 def function @function end |
#parameters ⇒ Array<Object>
The parameters to be passed to the function being executed. The object type
for each parameter should match the expected type in Apps Script.
Parameters cannot be Apps Script-specific object types (such as a
Document
or a Calendar
); they can only be primitive types such as
string
, number
, array
, object
, or boolean
. Optional.
Corresponds to the JSON property parameters
93 94 95 |
# File 'generated/google/apis/script_v1/classes.rb', line 93 def parameters @parameters end |
#session_state ⇒ String
For Android add-ons only. An ID that represents the user's current session
in the Android app for Google Docs or Sheets, included as extra data in the
Intent
that launches the add-on. When an Android add-on is run with a session
state, it gains the privileges of a
bound
script—that is, it can access information like the user's current
cursor position (in Docs) or selected cell (in Sheets). To retrieve the
state, call
Intent.getStringExtra("com.google.android.apps.docs.addons.SessionState")
.
Optional.
Corresponds to the JSON property sessionState
108 109 110 |
# File 'generated/google/apis/script_v1/classes.rb', line 108 def session_state @session_state end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
115 116 117 118 119 120 |
# File 'generated/google/apis/script_v1/classes.rb', line 115 def update!(**args) @dev_mode = args[:dev_mode] if args.key?(:dev_mode) @function = args[:function] if args.key?(:function) @parameters = args[:parameters] if args.key?(:parameters) @session_state = args[:session_state] if args.key?(:session_state) end |