View source: R/suso_api_assignment.R
suso_set_assignments | R Documentation |
suso_set_assignments
allows to (re-)assign, change limits or audio
recording settings, as well as archiving/unarchive and close assignments.
suso_set_assignments(
server = suso_get_api_key("susoServer"),
apiUser = suso_get_api_key("susoUser"),
apiPass = suso_get_api_key("susoPass"),
token = NULL,
workspace = NULL,
AssId = NULL,
payload = NULL,
operations.type = c("recordAudio", "archive", "assign", "changeQuantity", "close",
"unarchive")
)
server |
Survey Solutions server address |
apiUser |
Survey Solutions API user |
apiPass |
Survey Solutions API password |
token |
If Survey Solutions server token is provided apiUser and apiPass will be ignored |
workspace |
If workspace name is provide requests are made regarding this specific workspace |
AssId |
the assignment id for which the change is required |
payload |
requirements depend on the operations type. See details bellow. |
operations.type |
specifies the desired operation, one of recordAudio, archive/unarchive, (re-)assign changeQuantity, or close, if specified, requires in some case also pauyload to be specified. See details bellow. |
If operations.type is recordAudio, TRUE/FALSE
is required as payload, if it is archive or unarchive,
no payload is required, if it is assign the payload must be the uid of the new responsible, if it is changeQuantity the payload
must be the new integer number of assignments, if it is close no payload is required.
Returns an S3 object of assignmentClass
## Not run:
# (re-)assign existing assignment
asslist<-suso_set_assignments(
workspace = "myworkspace",
AssId = 10,
payload = "43f3d2bd-7959-4706-97ae-2653b5685c9e",
operations.type = "assign"
)
# get all assignment for specific responsible
asslist<-suso_set_assignments(
workspace = "myworkspace",
responsibleID = "a67d2b82-bf28-40cf-bd1a-7901225c0885"
)
# get the overall count
getinfo(asslist, "totalcount")
#get all single assignment details
asslist<-suso_set_assignments(
workspace = "myworkspace",
AssId = 1
)
# retrieve the uid of the person responsible
getinfo(asslist, "responsibleid")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.