get_interviewers: Get information about interviewers on the server

Description Usage Arguments Details Value Examples

View source: R/get_interviewers.R

Description

get_interviewers returns a data frame containing information about interviewer account. Due to the current limitations of the API, only interviewers that are not archived/locked appear in the output data frame. If a supervisor has no interviewers or all the interviewers on their team are locked/archived, then the output data frame will contain a row for that supervisor with both InterName and InterId being NA.

Usage

1
2
3
4
5
6
7
get_interviewers(
  super_names = NULL,
  super_ids = NULL,
  server = NULL,
  user = NULL,
  password = NULL
)

Arguments

super_names

Usernames of the supervisors that you would like to get the list of interviewers for. This accepts a vector of multiple supervisor usernames. To get data on every interviewer account, leave super_names and super_ids null.

super_ids

User Id of the supervisors that you would like to get the list of interviewers for. This accepts a vector of multiple supervisor Ids. User Ids can have dashes or not.

server

Prefix for the survey server. It is whatever comes before mysurvey.solutions: [prefix].mysurvey.solutions.

user

Username for the API user on the server.

password

Password for the API user on the server.

Details

The data frame will have the following columns:

Value

A data frame data frame containining information about interviewer accounts.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 

## Get data on all interviewers that are currently not archived on server
all_ints <- get_interviewers(server = "lfs2018",
user = "APIuser2018", password = "SafePassword123")

## Using the usernames for supervisors
supervisors <- c("North_Supervisor", "East_Supervisor")

interviewers <- get_interviewers(super_names = supervisors,
server = "lfs2018", user = "APIuser2018", password = "SafePassword123")

## Using user Ids for supervisors
supervisors <- c("59e60ce7-a6f9-4b0b-a5b3-ab6e8ce76464",
"60d28f7f-6195-4136-a8e8-a0c118218f0d")

interviewers <- get_interviewers(super_ids = supervisors,
server = "lfs2018", user = "APIuser2018", password = "SafePassword123")

## End(Not run)

l2nguyen/susoapir documentation built on Jan. 14, 2020, 2:29 p.m.