Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedict Witzenberger committed Oct 22, 2020
1 parent f6043bd commit ac78d2a
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion R/dw_create_folder.R
Expand Up @@ -45,7 +45,7 @@ dw_create_folder <- function(name = "", organization_id = "", parent_id = "", ap
cat(paste0("New Folder '", parsed$name, "' successfully created!", "\n",
"Folder-ID is: ", parsed$id, "\n"))
} else {
warning(paste0("There has been an error in the folder creation process. Statuscode of the response: ", httr::status_code(r)), immediate. = TRUE)
stop(paste0("There has been an error in the folder creation process. Statuscode of the response: ", httr::status_code(r)), immediate. = TRUE)
}

return(parsed)
Expand Down
2 changes: 1 addition & 1 deletion R/dw_data_to_chart.R
Expand Up @@ -61,7 +61,7 @@ dw_data_to_chart <- function(x, chart_id, parse_dates = TRUE, api_key = "environ
if (httr::status_code(r) %in% c(200, 201, 202, 204)) {
cat(paste0("Data in ", chart_id, " successfully updated.", "\n"))
} else {
warning(paste0("There has been an error in the upload process. Statuscode of the response: ", httr::status_code(r)), immediate. = TRUE)
stop(paste0("There has been an error in the upload process. Statuscode of the response: ", httr::status_code(r)), immediate. = TRUE)
}

}
2 changes: 1 addition & 1 deletion R/dw_delete_chart.R
Expand Up @@ -31,7 +31,7 @@ dw_delete_chart <- function(chart_id, api_key = "environment") {
if (httr::status_code(r) == "204") {
cat(paste0("Chart ", chart_id, " sucessfully deleted!", "\n"))
} else {
warning("There has been an error while deleting the chart!", immediate. = TRUE)
stop("There has been an error while deleting the chart!", immediate. = TRUE)
return(r)
}

Expand Down
2 changes: 1 addition & 1 deletion R/dw_edit_chart.R
Expand Up @@ -235,7 +235,7 @@ dw_edit_chart <- function(chart_id, api_key = "environment", title = "", intro =
cat(paste0("Chart ", chart_id_response, " succesfully updated.", "\n"))

} else {
warning(paste0("There has been an error in the upload process. Statuscode of the response: ", httr::status_code(r)), immediate. = TRUE)
stop(paste0("There has been an error in the upload process. Statuscode of the response: ", httr::status_code(r)), immediate. = TRUE)
}

httr::handle_reset(url_upload)
Expand Down
3 changes: 1 addition & 2 deletions R/dw_invite_user.R
Expand Up @@ -16,8 +16,7 @@
#'
#' \dontrun{
#' dw_invite_user(team = "testTeam", email = "test_at_test.com", role = "admin")
#' # uses the preset key in the .Renviron-file
#' }
#' # uses the preset key in the .Renviron-file}
#'
#' @rdname dw_invite_user
#' @export
Expand Down
2 changes: 1 addition & 1 deletion R/dw_publish_chart.R
Expand Up @@ -77,7 +77,7 @@ dw_publish_chart <- function(chart_id, api_key = "environment", return_urls = TR
}

} else {
warning(paste0("There has been an error in the publication process. Statuscode of the response: ", httr::status_code(r)), immediate. = TRUE)
stop(paste0("There has been an error in the publication process. Statuscode of the response: ", httr::status_code(r)), immediate. = TRUE)
}
}

Expand Down
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -14,6 +14,7 @@ All functions (except `datawrapper_auth()`) are preceded by `dw_`:
* lists all created charts: `dw_list_charts()`.
* lists all folders: `dw_list_folders()`.
* creates a new Datawrapper chart via `dw_create_chart()`
* copy a existing chart with: `dw_copy_chart()`
* adds data from a R-dataframe to an existing Datawrapper chart via `dw_data_to_chart()`
* retrieves (`dw_retrieve_chart_metadata()`) or edits metadata, description and visualization of an existing chart via `dw_edit_chart()`
* publishes and republishes a Datawrapper chart via `dw_publish_chart()`
Expand Down
1 change: 1 addition & 0 deletions Readme.Rmd
Expand Up @@ -26,6 +26,7 @@ All functions (except `datawrapper_auth()`) are preceded by `dw_`:
* lists all created charts: `dw_list_charts()`.
* lists all folders: `dw_list_folders()`.
* creates a new Datawrapper chart via `dw_create_chart()`
* copy a existing chart with: `dw_copy_chart()`
* adds data from a R-dataframe to an existing Datawrapper chart via `dw_data_to_chart()`
* retrieves (`dw_retrieve_chart_metadata()`) or edits metadata, description and visualization of an existing chart via `dw_edit_chart()`
* publishes and republishes a Datawrapper chart via `dw_publish_chart()`
Expand Down
Binary file modified data/dw_basemaps.rda
Binary file not shown.
24 changes: 12 additions & 12 deletions docs/articles/map.html

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

2 changes: 2 additions & 0 deletions docs/index.html

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

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Expand Up @@ -4,5 +4,5 @@ pkgdown_sha: ~
articles:
map: map.html
usage: usage.html
last_built: 2020-10-15T11:26Z
last_built: 2020-10-22T16:19Z

4 changes: 2 additions & 2 deletions docs/reference/dw_basemaps.html

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

0 comments on commit ac78d2a

Please sign in to comment.