Builder to create a getAuthType()
response for your script project.
function getAuthType() { var cc = DataStudioApp.createCommunityConnector(); var authTypes = cc.AuthType; return cc.newAuthTypeResponse() .setAuthType(authTypes.USER_PASS) .setHelpUrl("https://www.example.org/connector-auth-help") .build(); }
Methods
Method | Return type | Brief description |
---|---|---|
build() | Object | Validates this object and returns it in the format needed by Data Studio. |
printJson() | String | Prints the JSON representation of this object. |
setAuthType(authType) | GetAuthTypeResponse | Sets the AuthType of the builder. |
setHelpUrl(helpUrl) | GetAuthTypeResponse | Sets the help URL of the builder. |
Detailed documentation
build()
Validates this object and returns it in the format needed by Data Studio.
Return
Object
— The validated GetAuthTypeResponse
object.
printJson()
Prints the JSON representation of this object. This is for debugging only.
Return
String
setAuthType(authType)
Sets the AuthType
of the builder.
Parameters
Name | Type | Description |
---|---|---|
authType | AuthType | The authentication type to set. |
Return
GetAuthTypeResponse
— This builder, for chaining.
setHelpUrl(helpUrl)
Sets the help URL of the builder.
The help URL is an optional URL the user can visit to get help on setting up auth. This is
only supported for USER_PASS
, KEY
, and USER_TOKEN
authTypes.
Parameters
Name | Type | Description |
---|---|---|
helpUrl | String | The help URL to set. |
Return
GetAuthTypeResponse
— This builder, for chaining.