#' eHELP
#' @description Get help on the etsy api documentation
#' @param object Name of the Etsy resource or method of interest. Optional.
#'
#' @return Side effect only. Opens a browser with the Etsy API documentation page requested
#' @export
#'
#' @examples
#' eHelp()
#' eHelp("findAllListingFiles")
#' eHelp("Listing")
eHelp <- function(object = NULL) {
doc_url <-
if (is.null(object)) {
etsy$api_doc_home_url
} else if (object %in% etsy$methods$name) {
type <- with(etsy$methods, type[name == object])
paste0(etsy$api_doc_reference_url, tolower(type), "#method_", tolower(object))
} else if (object %in% etsy$methods$type) {
paste0(etsy$api_doc_reference_url, tolower(object))
} else {
etsy$api_doc_home_url
}
browseURL(doc_url)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.