包含连接器的配置条目。这些配置条目用于定义在添加新连接器时系统会询问哪些问题。
const cc = DataStudioApp.createCommunityConnector(); const config = cc.getConfig(); const info_entry = config.newInfo().setId('info_id').setHelpText( 'This connector can connect to multiple data endpoints.');
方法
方法 | 返回类型 | 简介 |
---|---|---|
build() | Object | 验证此对象,并以数据分析所需的格式返回该对象。 |
new | Checkbox | 返回新的复选框配置条目。 |
new | Info | 返回新的 info 配置条目。 |
new | Option | 返回新的选项构建器。 |
new | Select | 返回新的多选配置条目。 |
new | Select | 返回新的选择单个配置条目。 |
new | Text | 返回新的文本区域配置条目。 |
new | Text | 返回新的文本输入配置条目。 |
print | String | 输出此对象的 JSON 表示法。 |
set | Config | 如果为 true ,则需要为 getData() 请求提供日期范围。 |
set | Config | 如果为 true ,则使用当前用户配置再次调用 get 。 |
详细文档
build()
newCheckbox()
newInfo()
newOptionBuilder()
newSelectMultiple()
newSelectSingle()
newTextArea()
newTextInput()
printJson()
输出此对象的 JSON 表示法。这仅用于调试。
返回
String
setDateRangeRequired(dateRangeRequired)
如果为 true
,则需要为 getData() 请求提供日期范围。
参数
名称 | 类型 | 说明 |
---|---|---|
date | Boolean | 是否应向 get 请求提供日期范围。 |
返回
Config
- 此构建器,用于链式调用。
setIsSteppedConfig(isSteppedConfig)
如果为 true
,则使用当前用户配置再次调用 get
。
参数
名称 | 类型 | 说明 |
---|---|---|
is | Boolean | 要设置的分级配置状态。 |
返回
Config
- 此构建器,用于链式调用。