Learn R Programming

Rmonkey (version 0.3.1)

templates: Get Survey Templates

Description

Get the list of available survey templates

Usage

templates(page = NULL, page_size = NULL, language_id = NULL, category_id = NULL, only_mine = TRUE, fields = NULL, api_key = getOption('sm_api_key'), oauth_token = getOption('sm_oauth_token'), ...)

Arguments

page
A number indicating which page of results to return.
page_size
The number of results to return per API call.
language_id
Language Id to filter templates with. See Data types for more information.
category_id
Category Id to filter templates with.
only_mine
A boolean specifying whether to return only templates available to the user. Default is TRUE.
fields
A character vector containing the names of fields to return in each sm_collector class object. See Details.
api_key
Your API key. By default, retrieved from getOption('sm_api_key').
oauth_token
Your OAuth 2.0 token, as generated by smlogin. By default, retrieved from getOption('sm_oauth_token').
...
Other arguments passed to POST.

Value

sm_template.

Details

Retrieves the list of templates available to the user. These can then be used in createsurvey to generate a new survey.

The fields argument accepts one or more of the following values: language_id, title, short_description, long_description, is_available_to_current_user, is_featured, is_certified, page_count, question_count, preview_url, category_id, category_name, category_description, date_modified, date_created.

References

https://developer.surveymonkey.com/mashery/get_template_list

Examples

Run this code
## Not run: 
# smlogin()
# templates()
# ## End(Not run)

Run the code above in your browser using DataLab