@datafire/google_consumersurveys v6.0.0
@datafire/google_consumersurveys
Client library for Consumer Surveys
Installation and Usage
npm install --save @datafire/google_consumersurveyslet google_consumersurveys = require('@datafire/google_consumersurveys').create({
  access_token: "",
  refresh_token: "",
  client_id: "",
  client_secret: "",
  redirect_uri: ""
});
.then(data => {
  console.log(data);
});Description
Creates and conducts surveys, lists the surveys that an authenticated user owns, and retrieves survey results and information about specified surveys.
Actions
oauthCallback
Exchange the code passed to your redirect URI for an access_token
google_consumersurveys.oauthCallback({
  "code": ""
}, context)Input
- input object- code required string
 
- code required 
Output
- output object- access_token string
- refresh_token string
- token_type string
- scope string
- expiration string
 
- access_token 
oauthRefresh
Exchange a refresh_token for an access_token
google_consumersurveys.oauthRefresh(null, context)Input
This action has no parameters
Output
- output object- access_token string
- refresh_token string
- token_type string
- scope string
- expiration string
 
- access_token 
mobileapppanels.list
Lists the MobileAppPanels available to the authenticated user.
google_consumersurveys.mobileapppanels.list({}, context)Input
- input object- maxResults integer
- startIndex integer
- token string
- alt string(values: json): Data format for the response.
- fields string: Selector specifying which fields to include in a partial response.
- key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- oauth_token string: OAuth 2.0 token for the current user.
- prettyPrint boolean: Returns response with indentations and line breaks.
- quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
- userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
 
- maxResults 
Output
- output MobileAppPanelsListResponse
mobileapppanels.get
Retrieves a MobileAppPanel that is available to the authenticated user.
google_consumersurveys.mobileapppanels.get({
  "panelId": ""
}, context)Input
- input object- panelId required string: External URL ID for the panel.
- alt string(values: json): Data format for the response.
- fields string: Selector specifying which fields to include in a partial response.
- key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- oauth_token string: OAuth 2.0 token for the current user.
- prettyPrint boolean: Returns response with indentations and line breaks.
- quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
- userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
 
- panelId required 
Output
- output MobileAppPanel
mobileapppanels.update
Updates a MobileAppPanel. Currently the only property that can be updated is the owners property.
google_consumersurveys.mobileapppanels.update({
  "panelId": ""
}, context)Input
- input object- panelId required string: External URL ID for the panel.
- body MobileAppPanel
- alt string(values: json): Data format for the response.
- fields string: Selector specifying which fields to include in a partial response.
- key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- oauth_token string: OAuth 2.0 token for the current user.
- prettyPrint boolean: Returns response with indentations and line breaks.
- quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
- userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
 
- panelId required 
Output
- output MobileAppPanel
surveys.list
Lists the surveys owned by the authenticated user.
google_consumersurveys.surveys.list({}, context)Input
- input object- maxResults integer
- startIndex integer
- token string
- alt string(values: json): Data format for the response.
- fields string: Selector specifying which fields to include in a partial response.
- key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- oauth_token string: OAuth 2.0 token for the current user.
- prettyPrint boolean: Returns response with indentations and line breaks.
- quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
- userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
 
- maxResults 
Output
- output SurveysListResponse
surveys.insert
Creates a survey.
google_consumersurveys.surveys.insert({}, context)Input
- input object- body Survey
- alt string(values: json): Data format for the response.
- fields string: Selector specifying which fields to include in a partial response.
- key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- oauth_token string: OAuth 2.0 token for the current user.
- prettyPrint boolean: Returns response with indentations and line breaks.
- quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
- userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
 
Output
- output Survey
surveys.start
Begins running a survey.
google_consumersurveys.surveys.start({
  "resourceId": ""
}, context)Input
- input object- resourceId required string
- body SurveysStartRequest
- alt string(values: json): Data format for the response.
- fields string: Selector specifying which fields to include in a partial response.
- key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- oauth_token string: OAuth 2.0 token for the current user.
- prettyPrint boolean: Returns response with indentations and line breaks.
- quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
- userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
 
- resourceId required 
Output
- output SurveysStartResponse
surveys.stop
Stops a running survey.
google_consumersurveys.surveys.stop({
  "resourceId": ""
}, context)Input
- input object- resourceId required string
- alt string(values: json): Data format for the response.
- fields string: Selector specifying which fields to include in a partial response.
- key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- oauth_token string: OAuth 2.0 token for the current user.
- prettyPrint boolean: Returns response with indentations and line breaks.
- quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
- userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
 
- resourceId required 
Output
- output SurveysStopResponse
surveys.delete
Removes a survey from view in all user GET requests.
google_consumersurveys.surveys.delete({
  "surveyUrlId": ""
}, context)Input
- input object- surveyUrlId required string: External URL ID for the survey.
- alt string(values: json): Data format for the response.
- fields string: Selector specifying which fields to include in a partial response.
- key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- oauth_token string: OAuth 2.0 token for the current user.
- prettyPrint boolean: Returns response with indentations and line breaks.
- quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
- userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
 
- surveyUrlId required 
Output
- output SurveysDeleteResponse
surveys.get
Retrieves information about the specified survey.
google_consumersurveys.surveys.get({
  "surveyUrlId": ""
}, context)Input
- input object- surveyUrlId required string: External URL ID for the survey.
- alt string(values: json): Data format for the response.
- fields string: Selector specifying which fields to include in a partial response.
- key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- oauth_token string: OAuth 2.0 token for the current user.
- prettyPrint boolean: Returns response with indentations and line breaks.
- quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
- userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
 
- surveyUrlId required 
Output
- output Survey
surveys.update
Updates a survey. Currently the only property that can be updated is the owners property.
google_consumersurveys.surveys.update({
  "surveyUrlId": ""
}, context)Input
- input object- surveyUrlId required string: External URL ID for the survey.
- body Survey
- alt string(values: json): Data format for the response.
- fields string: Selector specifying which fields to include in a partial response.
- key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- oauth_token string: OAuth 2.0 token for the current user.
- prettyPrint boolean: Returns response with indentations and line breaks.
- quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
- userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
 
- surveyUrlId required 
Output
- output Survey
results.get
Retrieves any survey results that have been produced so far. Results are formatted as an Excel file. You must add "?alt=media" to the URL as an argument to get results.
google_consumersurveys.results.get({
  "surveyUrlId": ""
}, context)Input
- input object- surveyUrlId required string: External URL ID for the survey.
- body ResultsGetRequest
- alt string(values: json): Data format for the response.
- fields string: Selector specifying which fields to include in a partial response.
- key string: API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
- oauth_token string: OAuth 2.0 token for the current user.
- prettyPrint boolean: Returns response with indentations and line breaks.
- quotaUser string: Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.
- userIp string: IP address of the site where the request originates. Use this if you want to enforce per-user limits.
 
- surveyUrlId required 
Output
- output SurveyResults
Definitions
FieldMask
- FieldMask object- fields array- items FieldMask
 
- id integer
 
- fields 
MobileAppPanel
- MobileAppPanel object- country string
- isPublicPanel boolean
- language string
- mobileAppPanelId string
- name string
- owners array- items string
 
- items 
 
- country 
MobileAppPanelsListResponse
- MobileAppPanelsListResponse object- pageInfo PageInfo
- requestId string: Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.
- resources array: An individual predefined panel of Opinion Rewards mobile users.- items MobileAppPanel
 
- tokenPagination TokenPagination
 
PageInfo
- PageInfo object- resultPerPage integer
- startIndex integer
- totalResults integer
 
- resultPerPage 
ResultsGetRequest
- ResultsGetRequest object- resultMask ResultsMask
 
ResultsMask
- ResultsMask object- fields array- items FieldMask
 
- projection string
 
- fields 
Survey
- Survey object- audience SurveyAudience
- cost SurveyCost
- customerData string
- description string
- owners array- items string
 
- items 
- questions array- items SurveyQuestion
 
- rejectionReason SurveyRejection
- state string
- surveyUrlId string
- title string
- wantedResponseCount integer
 
SurveyAudience
- SurveyAudience object- ages array- items string
 
- items 
- country string
- countrySubdivision string
- gender string
- languages array- items string
 
- items 
- mobileAppPanelId string
- populationSource string
 
- ages 
SurveyCost
- SurveyCost object- costPerResponseNanos string
- currencyCode string
- maxCostPerResponseNanos string
- nanos string
 
- costPerResponseNanos 
SurveyQuestion
- SurveyQuestion object- answerOrder string
- answers array- items string
 
- items 
- hasOther boolean
- highValueLabel string
- images array- items SurveyQuestionImage
 
- lastAnswerPositionPinned boolean
- lowValueLabel string
- mustPickSuggestion boolean
- numStars string
- openTextPlaceholder string
- openTextSuggestions array- items string
 
- items 
- question string
- sentimentText string
- singleLineResponse boolean
- thresholdAnswers array- items string
 
- items 
- type string
- unitOfMeasurementLabel string
- videoId string
 
- answerOrder 
SurveyQuestionImage
- SurveyQuestionImage object- altText string
- data string
- url string
 
- altText 
SurveyRejection
- SurveyRejection object- explanation string
- type string
 
- explanation 
SurveyResults
- SurveyResults object- status string
- surveyUrlId string
 
- status 
SurveysDeleteResponse
- SurveysDeleteResponse object- requestId string: Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.
 
- requestId 
SurveysListResponse
- SurveysListResponse object- pageInfo PageInfo
- requestId string: Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.
- resources array: An individual survey resource.- items Survey
 
- tokenPagination TokenPagination
 
SurveysStartRequest
- SurveysStartRequest object- maxCostPerResponseNanos string: Threshold to start a survey automically if the quoted prices is less than or equal to this value. See Survey.Cost for more details.
 
- maxCostPerResponseNanos 
SurveysStartResponse
- SurveysStartResponse object- requestId string: Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.
 
- requestId 
SurveysStopResponse
- SurveysStopResponse object- requestId string: Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.
 
- requestId 
TokenPagination
- TokenPagination object- nextPageToken string
- previousPageToken string
 
- nextPageToken