R/attachments.R

Defines functions asn_attachments_find_by_task asn_attachments_find_by_id

Documented in asn_attachments_find_by_id asn_attachments_find_by_task

# DO NOT EDIT MANUALLY - This file is autogenerated from Asana API Specs
#' Attachments
#'
#'
#'  An _attachment_ object represents any file attached to a task in Asana,
#'  whether it's an uploaded file or one associated via a third-party service
#'  such as Dropbox or Google Drive.
#' @name asn_attachments
#' @rdname asn_attachments
#' @family attachments
#' @seealso \link{https://asana.com/developers/api-reference/attachments}
NULL

#' Returns the full record for a single attachment.
#'
#' @param attachment  {Id} Globally unique identifier for the attachment.#'
#' @param ...  {Object} Parameters for the request
#' @export
#' @family attachments
asn_attachments_find_by_id = function(attachment, ..., options = list()){
  path = sprintf("/attachments/%s", attachment)
  asn_get(endpoint = path, ..., options = options)
}


#' Returns the compact records for all attachments on the task.
#'
#' @param task  {Id} Globally unique identifier for the task.#'
#' @param ...  {Object} Parameters for the request
#' @export
#' @family attachments
asn_attachments_find_by_task = function(task, ..., options = list()){
  path = sprintf("/tasks/%s/attachments", task)
  asn_get(endpoint = path, ..., options = options)
}
datacamp/asana documentation built on Sept. 18, 2023, 8:51 a.m.