Class GetDataResponse

Get Data Response

Builder to create a get Data() response for your script project.

 function 
  
 getFields 
 () 
  
 { 
  
 //... 
 } 
 function 
  
 getData 
 () 
  
 { 
  
 const 
  
 cc 
  
 = 
  
 DataStudioApp 
 . 
 createCommunityConnector 
 (); 
  
 return 
  
 cc 
 . 
 newGetDataResponse 
 () 
  
 . 
 setFields 
 ( 
 getFields 
 ()) 
  
 . 
 addRow 
 ([ 
 '3' 
 , 
  
 'Foobar.com' 
 ]) 
  
 . 
 addRow 
 ([ 
 '4' 
 , 
  
 'Foobaz.com' 
 ]) 
  
 . 
 addRows 
 ([ 
  
 [ 
 '5' 
 , 
  
 'Fizzbuz.com' 
 ], 
  
 [ 
 '6' 
 , 
  
 'Fizzbaz.com' 
 ], 
  
 ]) 
  
 . 
 build 
 (); 
 } 

Methods

Method Return type Brief description
Get Data Response Adds multiple rows of data to this Get Data Response .
Get Data Response Adds a row of data to this Get Data Response .
Object Validates this object and returns it in the format needed by Data Studio.
Get Data Response Sets the Fields of the builder.
Get Data Response Sets the filters applied status for this builder.

Detailed documentation

add All Rows(rows)

Adds multiple rows of data to this Get Data Response .

Parameters

Name Type Description
rows
String[][] The rows of data to set.

Return

Get Data Response — This builder, for chaining.


add Row(row)

Adds a row of data to this Get Data Response .

Parameters

Name Type Description
row
String[] The row of data to set.

Return

Get Data Response — This builder, for chaining.


build()

Validates this object and returns it in the format needed by Data Studio.

Return

Object — The validated Get Data Response object.


set Fields(fields)

Sets the Fields of the builder.

Parameters

Name Type Description
fields
Fields The fields to set.

Return

Get Data Response — This builder, for chaining.


set Filters Applied(filtersApplied)

Sets the filters applied status for this builder. Set to true if all filters were successfully applied, false otherwise.

Parameters

Name Type Description
filters Applied
Boolean - The filters applied status to set.

Return

Get Data Response — This builder, for chaining.

Create a Mobile Website
View Site in Mobile | Classic
Share by: