[ ] devtools::document() for Rd and NAMESPACE updating
[ ] Add entry to pkgdown config
[ ] Add test (use_test('tickets'))
[ ] Add NEWS entry
[ ] Open PR referencing this issue
R script template
#' WIP - Get all tickets (raw and tidy)
#'
#' @description Get all tickets from a portal, up to 100 per request. from the [Get all tickets endpoint](https://developers.hubspot.com/docs/methods/tickets/get-all-tickets).
#' @details Required scope(s) for the OAuth token: tickets.
#' @template token_path
#' @template apikey
#' @template o_auth_access_token_or_api_key ADD TO A TEMPLATE Used to authenticate the request. Please see this page for more details about authentication.
#' @template offset ADD TO A TEMPLATE Used to get the next set of results. Check the value of hasMore in the response to see if there are more tickets to get. If hasMore is true, you use the returned offset value in the &offset= parameter of the next request to get the next set of records.
#' @template ticket_properties ADD TO A TEMPLATE By default, only the ID and a few other system fields are returned for the tickets. You can include ticket properties in the response by requesting them in the URL. This parameter can be included multiple times to request multiple properties. See the example for more details.
#' @template ticket_properties_with_history ADD TO A TEMPLATE This parameter behaves exactly like the properties parameter above, with the exception that properties included with this parameter also return the full version history for the property.
#' @return A list (`hs_tickets_raw()`)
#' @rdname tickets
#' @export
#' @examples
#' \donttest{
#' hs_tickets_raw(o_auth_access_token_or_api_key, offset, ticket_properties, ticket_properties_with_history)
#' }
hs_tickets_raw <- function(o_auth_access_token_or_api_key, offset, ticket_properties, ticket_properties_with_history) {
path <- "GET /crm-objects/v1/objects/tickets/paged"
}
# tidiers -----------------------------------------------------------------
#' @rdname tickets
#' @template tickets
#' @template view
#' @return A tibble with associated entities (`hs_tickets_tidy()`)
#' @export
hs_tickets_tidy <- function(tickets = hs_tickets_raw(),
view = "lalalala") {
# view <- match.arg(view, c('lalalala'))
# switch(view,
# 'lalalala' = blabla)
}
Not sure where the ticket properties would come from (Hubspot knowledge maybe... there is apparently no ticket properties endpoint like the contact properties endpoint).
Get all tickets
use_r('tickets')
+ scaffold below)devtools::load_all()
for tryingdevtools::document()
for Rd and NAMESPACE updatinguse_test('tickets')
)R script template
test template