CastorAPIWrapper-class | R Documentation |
Class used to wrap Castor REST API.
Class used to wrap Castor REST API.
An R6 class object.
getRequest(req_path, query_data): Sends a request to the API
given a url path and any query parameters (such as page number or include
arguments).
collectPages(request_url, page, include:
getStudy(study_id): Retrieves information about given study.
getStudiesPages(): Retries all Castor studies in account.
getForm(study_id, form_id): Retrieves information about given study.
getFormsPages(): Retries all Castor studies in account.
getField(study_id, field_id, include): Gets a specified
field.
getFieldsPages(study_id, include, page): Gets all fields pages
for a given study.
getParticipant(study_id, participant_id): Gets a specified
participant.
getParticipantPages(study_id: Gets all participants for a given
study.
getStudyDataPoint(study_id, participant_id,
field_id: Gets an individual data
point for a given study, participant and field.
getStudyDataPointsPages(study_id, participant_id,
filter_types: Gets all data
points for a given study and participant Filter types may be supplied for fields
types as a character vector of field types.
new()
CastorAPIWrapper$new( username, password, key, secret, access_token = NULL, type_to_func = self$type_to_func, base_url = "https://dev.do.castoredc.com/", verbose = self$verbose )
castorOAuth()
CastorAPIWrapper$castorOAuth(key, secret, baseurl)
getRequest()
CastorAPIWrapper$getRequest(req_path, query_data = list(), raw = FALSE)
collectPages()
CastorAPIWrapper$collectPages( request_url, page = NULL, include = NULL, page_size = NULL, ... )
getStudy()
CastorAPIWrapper$getStudy(study_id)
getStudiesPages()
CastorAPIWrapper$getStudiesPages(page = NULL)
getUsersPages()
CastorAPIWrapper$getUsersPages(page = NULL)
getForm()
CastorAPIWrapper$getForm(study_id, form_id)
getFormsPages()
CastorAPIWrapper$getFormsPages(study_id, page = NULL)
getVisit()
CastorAPIWrapper$getVisit(study_id, visit_id)
getVisitsPages()
CastorAPIWrapper$getVisitsPages(study_id, page = NULL)
getSurvey()
CastorAPIWrapper$getSurvey(study_id, survey_id)
getSurveysPages()
CastorAPIWrapper$getSurveysPages(study_id, include = "forms", page = NULL)
getSurveyPackage()
CastorAPIWrapper$getSurveyPackage(study_id, surveypackage_id)
getSurveyPackagesPages()
CastorAPIWrapper$getSurveyPackagesPages(study_id, page = NULL)
getSurveyPackageInstance()
CastorAPIWrapper$getSurveyPackageInstance(study_id, surveypackageinstance_id)
getSurveyPackageInstancesPages()
CastorAPIWrapper$getSurveyPackageInstancesPages(study_id, page = NULL)
getRepeatingData()
CastorAPIWrapper$getRepeatingData(study_id, repeating_data_id, include = NULL)
getRepeatingDatasPages()
CastorAPIWrapper$getRepeatingDatasPages( study_id, include = "optiongroup", page = NULL )
getRepeatingDataForm()
CastorAPIWrapper$getRepeatingDataForm( study_id, repeating_data_id, repeating_data_form_id )
getRepeatingDataFormsPages()
CastorAPIWrapper$getRepeatingDataFormsPages( study_id, repeating_data_id, page = NULL )
getField()
CastorAPIWrapper$getField(study_id, field_id, include = NULL)
getFieldsPages()
CastorAPIWrapper$getFieldsPages(study_id, include = "optiongroup", page = NULL)
getParticipant()
CastorAPIWrapper$getParticipant(study_id, participant_id)
getParticipantsPages()
CastorAPIWrapper$getParticipantsPages(study_id, page = NULL)
getStudyDataPoint()
CastorAPIWrapper$getStudyDataPoint(study_id, participant_id, field_id)
getStudyDataPointsPages()
CastorAPIWrapper$getStudyDataPointsPages(study_id, participant_id, page = NULL)
getRepeatingDataInstanceMetadataPages()
CastorAPIWrapper$getRepeatingDataInstanceMetadataPages(study_id, page = NULL)
clone()
The objects of this class are cloneable with this method.
CastorAPIWrapper$clone(deep = FALSE)
deep
Whether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.