collectors: Get Survey Collectors

Description Usage Arguments Details Value Author(s) References Examples

Description

Get the list of collectors for a survey

Usage

1
2
3
4
5
collectors(survey, page = NULL, page_size = NULL,
           start_date = NULL, end_date = NULL,
           name = NULL, order_asc = NULL, fields = NULL,
           api_key = getOption('sm_api_key'),
           oauth_token = getOption('sm_oauth_token'), ...)

Arguments

survey

A Survey Monkey survey ID number (or an object of class “sm_survey” from which it can be extracted), possibly returned by surveylist.

page

A number indicating which page of results to return.

page_size

The number of results to return per API call. Default is 1000.

start_date

A start datetime to restrict result to. Any returned collectors must have been created on or after this datetime. Required format is YYYY-MM-DD HH:MM:SS, implicitly in UTC; if argument is of class POSIXct, formatting is handled automatically.

end_date

An end datetime to restrict result to. Any returned collectors must have been created strictly before this datetime. Required format is YYYY-MM-DD HH:MM:SS, implicitly in UTC; if argument is of class POSIXct, formatting is handled automatically.

name

A character string containing a name of a survey collector to search for.

order_asc

A boolean indicating whether results should be sorted in ascending or descending (the default) order.

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 collectors for a specified survey.

The fields argument accepts one or more the following values: url, open, type, name, date_created, date_modified.

Value

A list of objects of class sm_collector.

Author(s)

Thomas J. Leeper

References

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

Examples

1
2
3
4
5
6
## Not run: 
smlogin()
s <- surveylist()
collectors(s[[1]]$survey_id)

## End(Not run)

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