tags: Get and set job tags

Description Usage Arguments Value See Also Examples

Description

Get, set, and replace the “tags” for a job

Usage

1
2
3
4
5
job_tags_get(id, ...)

job_tags_add(id, tags, verbose = TRUE, ...)

job_tags_replace(id, tags, verbose = TRUE, ...)

Arguments

id

A character string containing an ID for job.

...

Additional arguments passed to cf_query.

tags

For job_tags_add, a character vector specifying one or more tags to add. For job_tags_replace, the same but to replace rather than add the tags.

verbose

A logical indicating whether to print additional information about the request.

Value

For job_tags_get, a character vector of tags. Otherwise, a logical TRUE, or an error.

See Also

job_create

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Not run: 
# create new job
f1 <- system.file("templates/instructions1.html", package = "crowdflower")
f2 <- system.file("templates/cml1.xml", package = "crowdflower")
j <- job_create(title = "Job Title", 
               instructions = readChar(f1, nchars = 1e8L),
               cml = readChar(f2, nchars = 1e8L))

# get tags
job_tags_get(j)

# add new tag
job_tags_add(j, "textanalysis")

# replace tags
job_tags_replace(j, c("foo", "bar"))
job_tags_get(j)

# delete job
job_delete(j)

## End(Not run)

cloudyr/crowdflower documentation built on May 13, 2019, 8:20 p.m.