Skip to content

Commit

Permalink
#81, removed commented out code inside of tag_create
Browse files Browse the repository at this point in the history
still not been able to test it yet
  • Loading branch information
sckott committed Aug 5, 2016
1 parent 14cc770 commit e4e7f2b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
14 changes: 8 additions & 6 deletions R/tag_create.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
#' added to, e.g. the id of vocabulary 'Genre'
#' @template args
#' @template key
#' @examples \dontrun{
#' tag_create(name = "TestTag1", vocabulary_id = "Testing1")
#' }
tag_create <- function(name, vocabulary_id,
key = get_default_key(), url = get_default_url(), as = 'list', ...) {

stop("Not working yet", call. = FALSE)
# body <- cc(list(name = name, vocabulary_id = vocabulary_id))
# res <- ckan_POST(url, 'tag_create',
# body = tojun(body, TRUE), key = key,
# encode = "json", ctj(), ...)
# switch(as, json = res, list = jsl(res), table = jsd(res))
body <- cc(list(name = name, vocabulary_id = vocabulary_id))
res <- ckan_POST(url, 'tag_create',
body = tojun(body, TRUE), key = key,
encode = "json", ctj(), verbose())
switch(as, json = res, list = jsl(res), table = jsd(res))
}
5 changes: 5 additions & 0 deletions man/tag_create.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e4e7f2b

Please sign in to comment.