Add support for Get all contact lists endpoint
maelle opened this issue · comments
- Create script (
use_r('contact_lists')
+ scaffold below) -
devtools::load_all()
for trying - Add/update templates under man-roxygen/
-
devtools::document()
for Rd and NAMESPACE updating - Add entry to pkgdown config
- Add test (
use_test('contact_lists')
) - Add NEWS entry
R script template
#' WIP - Get all contact lists (raw and tidy)
#'
#' @description Return the contact lists for a portal. from the [Get all contact lists endpoint](https://developers.hubspot.com/docs/methods/lists/get_lists).
#' @note NOT IMPLEMENTED YET
#' @details Required scope(s) for the OAuth token: contacts.
#' @template token_path
#' @template apikey
#'
#' @return A list (`hs_contact_lists_raw()`)
#' @rdname contact-lists
#' @export
#' @examples
#' \donttest{
#' hs_contact_lists_raw()
#' }
hs_contact_lists_raw <- function() {
path <- " /contacts/v1/lists"
}
# tidiers -----------------------------------------------------------------
#' @rdname contact-lists
#' @template contact_lists
#' @template view
#' @return A tibble with associated entities (`hs_contact_lists_raw()`)
#' @export
hs_contact_lists_raw <- function(contact_lists = hs_contact_lists_raw(),
view = "lalalala") {
# view <- match.arg(view, c('lalalala'))
# switch(view,
# 'lalalala' = blabla)
}
test template
vcr::use_cassette("hs_contact_lists_raw", {
test_that("hs_contact_lists_raw works", {
expect_is(hs_contact_lists_raw(), "list")
})
})