Get the list of available survey templates
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'))
A number indicating which page of results to return.
The number of results to return per API call.
Language Id to filter templates with. See Data types for more information.
Category Id to filter templates with.
A boolean specifying whether to return only templates available to the user. Default is TRUE
.
A character vector containing the names of fields to return in each sm_collector
class object. See Details.
Your API key. By default, retrieved from getOption('sm_api_key')
.
Your OAuth 2.0 token, as generated by smlogin
. By default, retrieved from getOption('sm_oauth_token')
.
A list of objects of class sm_template
.
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
.
https://developer.surveymonkey.com/mashery/get_template_list
# NOT RUN {
smlogin()
templates()
# }
Run the code above in your browser using DataLab