templates: Get Survey Templates

Description Usage Arguments Details Value Author(s) References Examples

Description

Get the list of available survey templates

Usage

1
2
3
4
5
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.

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.

Value

A list of objects of class sm_template.

Author(s)

Thomas J. Leeper

References

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

Examples

1
2
3
4
5
## Not run: 
smlogin()
templates()

## End(Not run)

leeper/Rmonkey documentation built on May 21, 2019, 12:36 a.m.