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 |
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
- 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)))))))))
- scriptsRun :: ExecutionRequest -> Text -> ScriptsRun
- data ScriptsRun
- srXgafv :: Lens' ScriptsRun (Maybe Xgafv)
- srUploadProtocol :: Lens' ScriptsRun (Maybe Text)
- srAccessToken :: Lens' ScriptsRun (Maybe Text)
- srUploadType :: Lens' ScriptsRun (Maybe Text)
- srPayload :: Lens' ScriptsRun ExecutionRequest
- srScriptId :: Lens' ScriptsRun Text
- srCallback :: Lens' ScriptsRun (Maybe Text)
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
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 # | |
Defined in Network.Google.Resource.Script.Scripts.Run (==) :: ScriptsRun -> ScriptsRun -> Bool # (/=) :: ScriptsRun -> ScriptsRun -> Bool # | |
Data ScriptsRun Source # | |
Defined in Network.Google.Resource.Script.Scripts.Run 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 # | |
Defined in Network.Google.Resource.Script.Scripts.Run showsPrec :: Int -> ScriptsRun -> ShowS # show :: ScriptsRun -> String # showList :: [ScriptsRun] -> ShowS # | |
Generic ScriptsRun Source # | |
Defined in Network.Google.Resource.Script.Scripts.Run type Rep ScriptsRun :: Type -> Type # from :: ScriptsRun -> Rep ScriptsRun x # to :: Rep ScriptsRun x -> ScriptsRun # | |
GoogleRequest ScriptsRun Source # | |
Defined in Network.Google.Resource.Script.Scripts.Run type Rs ScriptsRun :: Type # type Scopes ScriptsRun :: [Symbol] # requestClient :: ScriptsRun -> GClient (Rs ScriptsRun) # | |
type Rep ScriptsRun Source # | |
Defined in Network.Google.Resource.Script.Scripts.Run type Rep ScriptsRun = D1 (MetaData "ScriptsRun" "Network.Google.Resource.Script.Scripts.Run" "gogol-script-0.4.0-FTMJIbj3qQWJYzgfzFUSMi" False) (C1 (MetaCons "ScriptsRun'" PrefixI True) ((S1 (MetaSel (Just "_srXgafv") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Xgafv)) :*: (S1 (MetaSel (Just "_srUploadProtocol") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_srAccessToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: ((S1 (MetaSel (Just "_srUploadType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_srPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ExecutionRequest)) :*: (S1 (MetaSel (Just "_srScriptId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "_srCallback") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))))) | |
type Scopes ScriptsRun Source # | |
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 # | |
Defined in Network.Google.Resource.Script.Scripts.Run |
Request Lenses
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**.
srCallback :: Lens' ScriptsRun (Maybe Text) Source #
JSONP