Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
- scriptService :: ServiceConfig
- mailGoogleComScope :: Proxy '["https://mail.google.com/"]
- m8FeedsScope :: Proxy '["https://www.google.com/m8/feeds"]
- adminDirectoryUserScope :: Proxy '["https://www.googleapis.com/auth/admin.directory.user"]
- userInfoEmailScope :: Proxy '["https://www.googleapis.com/auth/userinfo.email"]
- formsCurrentOnlyScope :: Proxy '["https://www.googleapis.com/auth/forms.currentonly"]
- driveScope :: Proxy '["https://www.googleapis.com/auth/drive"]
- adminDirectoryGroupScope :: Proxy '["https://www.googleapis.com/auth/admin.directory.group"]
- calendarFeedsScope :: Proxy '["https://www.google.com/calendar/feeds"]
- formsScope :: Proxy '["https://www.googleapis.com/auth/forms"]
- spreadsheetsScope :: Proxy '["https://www.googleapis.com/auth/spreadsheets"]
- groupsScope :: Proxy '["https://www.googleapis.com/auth/groups"]
- data Status
- status :: Status
- sDetails :: Lens' Status [StatusDetailsItem]
- sCode :: Lens' Status (Maybe Int32)
- sMessage :: Lens' Status (Maybe Text)
- data Operation
- operation :: Operation
- oDone :: Lens' Operation (Maybe Bool)
- oError :: Lens' Operation (Maybe Status)
- oResponse :: Lens' Operation (Maybe OperationResponse)
- oName :: Lens' Operation (Maybe Text)
- oMetadata :: Lens' Operation (Maybe OperationMetadata)
- data ExecutionRequest
- executionRequest :: ExecutionRequest
- erFunction :: Lens' ExecutionRequest (Maybe Text)
- erSessionState :: Lens' ExecutionRequest (Maybe Text)
- erDevMode :: Lens' ExecutionRequest (Maybe Bool)
- erParameters :: Lens' ExecutionRequest [JSONValue]
- data StatusDetailsItem
- statusDetailsItem :: HashMap Text JSONValue -> StatusDetailsItem
- sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
- data ScriptStackTraceElement
- scriptStackTraceElement :: ScriptStackTraceElement
- ssteFunction :: Lens' ScriptStackTraceElement (Maybe Text)
- ssteLineNumber :: Lens' ScriptStackTraceElement (Maybe Int32)
- data ExecutionError
- executionError :: ExecutionError
- eeScriptStackTraceElements :: Lens' ExecutionError [ScriptStackTraceElement]
- eeErrorType :: Lens' ExecutionError (Maybe Text)
- eeErrorMessage :: Lens' ExecutionError (Maybe Text)
- data OperationMetadata
- operationMetadata :: HashMap Text JSONValue -> OperationMetadata
- omAddtional :: Lens' OperationMetadata (HashMap Text JSONValue)
- data OperationResponse
- operationResponse :: HashMap Text JSONValue -> OperationResponse
- orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
- data ExecutionResponse
- executionResponse :: ExecutionResponse
- erResult :: Lens' ExecutionResponse (Maybe JSONValue)
Service Configuration
scriptService :: ServiceConfig Source #
Default request referring to version v1
of the Google Apps Script Execution API. This contains the host and root path used as a starting point for constructing service requests.
OAuth Scopes
mailGoogleComScope :: Proxy '["https://mail.google.com/"] Source #
View and manage your mail
m8FeedsScope :: Proxy '["https://www.google.com/m8/feeds"] Source #
Manage your contacts
adminDirectoryUserScope :: Proxy '["https://www.googleapis.com/auth/admin.directory.user"] Source #
View and manage the provisioning of users on your domain
userInfoEmailScope :: Proxy '["https://www.googleapis.com/auth/userinfo.email"] Source #
View your email address
formsCurrentOnlyScope :: Proxy '["https://www.googleapis.com/auth/forms.currentonly"] Source #
View and manage forms that this application has been installed in
driveScope :: Proxy '["https://www.googleapis.com/auth/drive"] Source #
View and manage the files in your Google Drive
adminDirectoryGroupScope :: Proxy '["https://www.googleapis.com/auth/admin.directory.group"] Source #
View and manage the provisioning of groups on your domain
calendarFeedsScope :: Proxy '["https://www.google.com/calendar/feeds"] Source #
Manage your calendars
formsScope :: Proxy '["https://www.googleapis.com/auth/forms"] Source #
View and manage your forms in Google Drive
spreadsheetsScope :: Proxy '["https://www.googleapis.com/auth/spreadsheets"] Source #
View and manage your spreadsheets in Google Drive
groupsScope :: Proxy '["https://www.googleapis.com/auth/groups"] Source #
View and manage your Google Groups
Status
If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, the response body's `error` field will contain this `Status` object.
See: status
smart constructor.
sDetails :: Lens' Status [StatusDetailsItem] Source #
An array that contains a single `ExecutionError` object that provides information about the nature of the error.
sCode :: Lens' Status (Maybe Int32) Source #
The status code, which should be an enum value of google.rpc.Code.
sMessage :: Lens' Status (Maybe Text) Source #
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
Operation
The response will not arrive until the function finishes executing. The maximum runtime is listed in the guide to limitations in Apps Script. If the script function returns successfully, the `response` field will contain an `ExecutionResponse` object with the function's return value in the object's `result` field. If the script function (or Apps Script itself) throws an exception, the `error` field will contain a `Status` object. The `Status` object's `details` field will contain an array with a single `ExecutionError` object that provides information about the nature of the error. If the `run` call itself fails (for example, because of a malformed request or an authorization error), the method will return an HTTP response code in the 4XX range with a different format for the response body. Client libraries will automatically convert a 4XX response into an exception class.
See: operation
smart constructor.
oError :: Lens' Operation (Maybe Status) Source #
If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, this field will contain a `Status` object. The `Status` object's `details` field will contain an array with a single `ExecutionError` object that provides information about the nature of the error.
oResponse :: Lens' Operation (Maybe OperationResponse) Source #
If the script function returns successfully, this field will contain an `ExecutionResponse` object with the function's return value as the object's `result` field.
ExecutionRequest
data ExecutionRequest Source #
A request to run the function in a script. The script is identified by the specified `script_id`. Executing a function on a script will return results based on the implementation of the script.
See: executionRequest
smart constructor.
executionRequest :: ExecutionRequest Source #
Creates a value of ExecutionRequest
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
erFunction :: Lens' ExecutionRequest (Maybe Text) Source #
The name of the function to execute in the given script. The name does not include parentheses or parameters.
erSessionState :: Lens' ExecutionRequest (Maybe Text) Source #
This field is not used.
erDevMode :: Lens' ExecutionRequest (Maybe Bool) Source #
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 Execution API. Optional; default is `false`.
erParameters :: Lens' ExecutionRequest [JSONValue] Source #
The parameters to be passed to the function being executed. The type for each parameter should match the expected type in Apps Script. Parameters cannot be Apps Script-specific objects (such as a `Document` or `Calendar`); they can only be primitive types such as a `string`, `number`, `array`, `object`, or `boolean`. Optional.
StatusDetailsItem
data StatusDetailsItem Source #
Creates a value of StatusDetailsItem
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue) Source #
Properties of the object. Contains field 'ype with type URL.
ScriptStackTraceElement
data ScriptStackTraceElement Source #
A stack trace through the script that shows where the execution failed.
See: scriptStackTraceElement
smart constructor.
scriptStackTraceElement :: ScriptStackTraceElement Source #
Creates a value of ScriptStackTraceElement
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ssteFunction :: Lens' ScriptStackTraceElement (Maybe Text) Source #
The name of the function that failed.
ssteLineNumber :: Lens' ScriptStackTraceElement (Maybe Int32) Source #
The line number where the script failed.
ExecutionError
data ExecutionError Source #
An object that provides information about the nature of an error in the Apps Script Execution API. If an `run` call succeeds but the script function (or Apps Script itself) throws an exception, the response body's `error` field will contain a `Status` object. The `Status` object's `details` field will contain an array with a single one of these `ExecutionError` objects.
See: executionError
smart constructor.
executionError :: ExecutionError Source #
Creates a value of ExecutionError
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
eeScriptStackTraceElements :: Lens' ExecutionError [ScriptStackTraceElement] Source #
An array of objects that provide a stack trace through the script to show where the execution failed, with the deepest call first.
eeErrorType :: Lens' ExecutionError (Maybe Text) Source #
The error type, for example `TypeError` or `ReferenceError`. If the error type is unavailable, this field is not included.
eeErrorMessage :: Lens' ExecutionError (Maybe Text) Source #
The error message thrown by Apps Script, usually localized into the user's language.
OperationMetadata
data OperationMetadata Source #
This field is not used.
See: operationMetadata
smart constructor.
Creates a value of OperationMetadata
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
omAddtional :: Lens' OperationMetadata (HashMap Text JSONValue) Source #
Properties of the object. Contains field 'ype with type URL.
OperationResponse
data OperationResponse Source #
If the script function returns successfully, this field will contain an `ExecutionResponse` object with the function's return value as the object's `result` field.
See: operationResponse
smart constructor.
Creates a value of OperationResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
orAddtional :: Lens' OperationResponse (HashMap Text JSONValue) Source #
Properties of the object. Contains field 'ype with type URL.
ExecutionResponse
data ExecutionResponse Source #
An object that provides the return value of a function executed through the Apps Script Execution API. If an `run` call succeeds and the script function returns successfully, the response body's `response` field will contain this `ExecutionResponse` object.
See: executionResponse
smart constructor.
executionResponse :: ExecutionResponse Source #
Creates a value of ExecutionResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
erResult :: Lens' ExecutionResponse (Maybe JSONValue) Source #
The return value of the script function. The type will match the type returned in Apps Script. Functions called through the Execution API cannot return Apps Script-specific objects (such as a `Document` or `Calendar`); they can only return primitive types such as a `string`, `number`, `array`, `object`, or `boolean`.