gogol-script-0.4.0: Google Apps Script SDK.

Copyright(c) 2015-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.Resource.Script.Scripts.Run

Contents

Description

Runs a function in an Apps Script project. The script project must be deployed for use with the Apps Script API and the calling application must share the same Cloud Platform project. This method requires authorization with an OAuth 2.0 token that includes at least one of the scopes listed in the Authorization section; script projects that do not require authorization cannot be executed through this API. To find the correct scopes to include in the authentication token, open the project in the script editor, then select **File > Project properties** and click the **Scopes** tab. The error `403, PERMISSION_DENIED: The caller does not have permission` indicates that the Cloud Platform project used to authorize the request is not the same as the one used by the script.

See: Apps Script API Reference for script.scripts.run.

Synopsis

REST Resource

type ScriptsRunResource = "v1" :> ("scripts" :> (CaptureMode "scriptId" "run" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] ExecutionRequest :> Post '[JSON] Operation))))))))) Source #

A resource alias for script.scripts.run method which the ScriptsRun request conforms to.

Creating a Request

scriptsRun Source #

Creates a value of ScriptsRun with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data ScriptsRun Source #

Runs a function in an Apps Script project. The script project must be deployed for use with the Apps Script API and the calling application must share the same Cloud Platform project. This method requires authorization with an OAuth 2.0 token that includes at least one of the scopes listed in the Authorization section; script projects that do not require authorization cannot be executed through this API. To find the correct scopes to include in the authentication token, open the project in the script editor, then select **File > Project properties** and click the **Scopes** tab. The error `403, PERMISSION_DENIED: The caller does not have permission` indicates that the Cloud Platform project used to authorize the request is not the same as the one used by the script.

See: scriptsRun smart constructor.

Instances
Eq ScriptsRun Source # 
Instance details

Defined in Network.Google.Resource.Script.Scripts.Run

Data ScriptsRun Source # 
Instance details

Defined in Network.Google.Resource.Script.Scripts.Run

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ScriptsRun -> c ScriptsRun #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ScriptsRun #

toConstr :: ScriptsRun -> Constr #

dataTypeOf :: ScriptsRun -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ScriptsRun) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ScriptsRun) #

gmapT :: (forall b. Data b => b -> b) -> ScriptsRun -> ScriptsRun #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ScriptsRun -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ScriptsRun -> r #

gmapQ :: (forall d. Data d => d -> u) -> ScriptsRun -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ScriptsRun -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ScriptsRun -> m ScriptsRun #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ScriptsRun -> m ScriptsRun #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ScriptsRun -> m ScriptsRun #

Show ScriptsRun Source # 
Instance details

Defined in Network.Google.Resource.Script.Scripts.Run

Generic ScriptsRun Source # 
Instance details

Defined in Network.Google.Resource.Script.Scripts.Run

Associated Types

type Rep ScriptsRun :: Type -> Type #

GoogleRequest ScriptsRun Source # 
Instance details

Defined in Network.Google.Resource.Script.Scripts.Run

Associated Types

type Rs ScriptsRun :: Type #

type Scopes ScriptsRun :: [Symbol] #

type Rep ScriptsRun Source # 
Instance details

Defined in Network.Google.Resource.Script.Scripts.Run

type Scopes ScriptsRun Source # 
Instance details

Defined in Network.Google.Resource.Script.Scripts.Run

type Scopes ScriptsRun = "https://mail.google.com/" ': ("https://www.google.com/calendar/feeds" ': ("https://www.google.com/m8/feeds" ': ("https://www.googleapis.com/auth/admin.directory.group" ': ("https://www.googleapis.com/auth/admin.directory.user" ': ("https://www.googleapis.com/auth/documents" ': ("https://www.googleapis.com/auth/drive" ': ("https://www.googleapis.com/auth/forms" ': ("https://www.googleapis.com/auth/forms.currentonly" ': ("https://www.googleapis.com/auth/groups" ': ("https://www.googleapis.com/auth/spreadsheets" ': ("https://www.googleapis.com/auth/userinfo.email" ': ([] :: [Symbol]))))))))))))
type Rs ScriptsRun Source # 
Instance details

Defined in Network.Google.Resource.Script.Scripts.Run

Request Lenses

srXgafv :: Lens' ScriptsRun (Maybe Xgafv) Source #

V1 error format.

srUploadProtocol :: Lens' ScriptsRun (Maybe Text) Source #

Upload protocol for media (e.g. "raw", "multipart").

srAccessToken :: Lens' ScriptsRun (Maybe Text) Source #

OAuth access token.

srUploadType :: Lens' ScriptsRun (Maybe Text) Source #

Legacy upload protocol for media (e.g. "media", "multipart").

srPayload :: Lens' ScriptsRun ExecutionRequest Source #

Multipart request metadata.

srScriptId :: Lens' ScriptsRun Text Source #

The script ID of the script to be executed. To find the script ID, open the project in the script editor and select **File > Project properties**.