|
1 | 1 | #' @title
|
2 |
| -#' Download a file from a REDCap project record |
| 2 | +#' Get survey link from REDCap |
3 | 3 | #'
|
4 | 4 | #' @description
|
5 |
| -#' This function uses REDCap's API to download a file. |
| 5 | +#' This function uses REDCap's API to get the link for a survey. |
6 | 6 | #'
|
7 | 7 | #' @param redcap_uri The
|
8 | 8 | #' [uri](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier)/url
|
|
11 | 11 | #' Required.
|
12 | 12 | #' @param token The user-specific string that serves as the password for a
|
13 | 13 | #' project. Required.
|
14 |
| -#' @param record The record ID where the file is to be imported. Required |
| 14 | +#' @param record The record ID associated with the |
| 15 | +#' survey link. Required |
15 | 16 | #' @param instrument The name of the instrument associated with the
|
16 | 17 | #' survey link. Required
|
17 |
| -#' @param event The name of the event where the file is saved in REDCap. |
| 18 | +#' @param event The name of the event associated with the |
| 19 | +#' survey link. |
18 | 20 | #' Optional
|
19 | 21 | #' @param verbose A boolean value indicating if `message`s should be printed
|
20 | 22 | #' to the R console during the operation. Optional.
|
|
27 | 29 | #'
|
28 | 30 | #' @return
|
29 | 31 | #' Currently, a list is returned with the following elements,
|
| 32 | +#' * `survey_link`: a character string containing the URL for the survey. |
30 | 33 | #' * `success`: A boolean value indicating if the operation was apparently
|
31 | 34 | #' successful.
|
32 | 35 | #' * `status_code`: The
|
33 | 36 | #' [http status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes)
|
34 | 37 | #' of the operation.
|
35 | 38 | #' * `outcome_message`: A human readable string indicating the operation's
|
36 | 39 | #' outcome.
|
37 |
| -#' * `records_affected_count`: The number of records inserted or updated. |
38 |
| -#' * `affected_ids`: The subject IDs of the inserted or updated records. |
| 40 | +#' * `instrument`: The instrument associated with the survey link. |
| 41 | +#' * `records_affected_count`: The number of records associated with |
| 42 | +#' the survey link. |
| 43 | +#' * `affected_ids`: The subject IDs associated with the survey link. |
39 | 44 | #' * `elapsed_seconds`: The duration of the function.
|
40 | 45 | #' * `raw_text`: If an operation is NOT successful, the text returned by
|
41 | 46 | #' REDCap. If an operation is successful, the `raw_text` is returned as an
|
42 | 47 | #' empty string to save RAM.
|
43 |
| -#' * `file_name`: The name of the file persisted to disk. This is useful if |
44 |
| -#' the name stored in REDCap is used (which is the default). |
45 | 48 | #'
|
46 | 49 | #' @details
|
47 | 50 | #' Currently, the function doesn't modify any variable types to conform to
|
|
0 commit comments