6.0.0 • Published 5 years ago

@datafire/google_consumersurveys v6.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

@datafire/google_consumersurveys

Client library for Consumer Surveys

Installation and Usage

npm install --save @datafire/google_consumersurveys
let 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

Output

  • output object
    • access_token string
    • refresh_token string
    • token_type string
    • scope string
    • expiration string

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

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.

Output

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.

Output

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.

Output

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.

Output

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

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.

Output

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.

Output

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.

Output

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.

Output

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.

Output

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.

Output

Definitions

FieldMask

  • FieldMask object

MobileAppPanel

  • MobileAppPanel object
    • country string
    • isPublicPanel boolean
    • language string
    • mobileAppPanelId string
    • name string
    • owners array
      • items string

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.
    • tokenPagination TokenPagination

PageInfo

  • PageInfo object
    • resultPerPage integer
    • startIndex integer
    • totalResults integer

ResultsGetRequest

ResultsMask

  • ResultsMask object

Survey

SurveyAudience

  • SurveyAudience object
    • ages array
      • items string
    • country string
    • countrySubdivision string
    • gender string
    • languages array
      • items string
    • mobileAppPanelId string
    • populationSource string

SurveyCost

  • SurveyCost object
    • costPerResponseNanos string
    • currencyCode string
    • maxCostPerResponseNanos string
    • nanos string

SurveyQuestion

  • SurveyQuestion object
    • answerOrder string
    • answers array
      • items string
    • hasOther boolean
    • highValueLabel string
    • images array
    • lastAnswerPositionPinned boolean
    • lowValueLabel string
    • mustPickSuggestion boolean
    • numStars string
    • openTextPlaceholder string
    • openTextSuggestions array
      • items string
    • question string
    • sentimentText string
    • singleLineResponse boolean
    • thresholdAnswers array
      • items string
    • type string
    • unitOfMeasurementLabel string
    • videoId string

SurveyQuestionImage

  • SurveyQuestionImage object
    • altText string
    • data string
    • url string

SurveyRejection

  • SurveyRejection object
    • explanation string
    • type string

SurveyResults

  • SurveyResults object
    • status string
    • surveyUrlId string

SurveysDeleteResponse

  • SurveysDeleteResponse object
    • requestId string: Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.

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.
    • 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.

SurveysStartResponse

  • SurveysStartResponse object
    • requestId string: Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.

SurveysStopResponse

  • SurveysStopResponse object
    • requestId string: Unique request ID used for logging and debugging. Please include in any error reporting or troubleshooting requests.

TokenPagination

  • TokenPagination object
    • nextPageToken string
    • previousPageToken string
6.0.0

5 years ago

5.0.0

7 years ago

4.0.0

7 years ago

3.0.0

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago