Package 'asanar'

Title: 'Asana' 'API'
Description: Client to access the 'Asana' 'API'.
Authors: Jon Harmon [aut, cre]
Maintainer: Jon Harmon <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9003
Built: 2024-11-17 03:54:49 UTC
Source: https://github.com/jonthegeek/asanar

Help Index


Visit Asana My Apps page

Description

Launch the Asana "My Apps" page (where you can create a new personal access token). After you create a token, copy/paste the value into the ASN_API_TOKEN environment variable. We recommend placing this environment variable in your .Renviron file.

Usage

asn_browse_token()

Value

The url of the "My Apps" page, invisibly.

Examples

asana_token_url <- asn_browse_token()
Sys.setenv(ASN_API_TOKEN = "1/12345:e12a3etc")

Get stories from a task

Description

Returns the compact records for all stories on the task.

Usage

asn_get_stories_for_task(task_gid, limit, offset, opt_fields)

Arguments

task_gid

(character scalar) The task to operate on.

limit

(optional) (integer scalar) Results per page. The number of objects to return per page. The value must be between 1 and 100.

offset

(optional) (character scalar) Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'

opt_fields

(optional) (list) Defines fields to return. Some requests return compact representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.

Value

A story represents an activity associated with an object in the Asana system.

Property Class Description
gid character scalar Globally unique identifier of the resource, as a string.
resource_type character scalar The base type of this resource.
created_at datetime scalar The time at which this resource was created.
created_by list A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.
resource_subtype character scalar The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning.
text character scalar Create-only. Human-readable text for the story or comment. This will not include the name of the creator. Note: This is not guaranteed to be stable for a given type of story. For example, text for a reassignment may not always say “assigned to …” as the text for a story can both be edited and change based on the language settings of the user making the request. Use the resource_subtype property to discover the action that created the story.

Get tasks from a project

Description

Returns the compact task records for all tasks within the given project, ordered by their priority within the project. Tasks can exist in more than one project at a time.

Usage

asn_get_tasks_for_project(
  project_gid,
  completed_since,
  limit,
  offset,
  opt_fields
)

Arguments

project_gid

(character scalar) Globally unique identifier for the project.

completed_since

(optional) (character scalar) Only return tasks that are either incomplete or that have been completed since this time. Accepts a date-time string or the keyword now.

limit

(optional) (integer scalar) Results per page. The number of objects to return per page. The value must be between 1 and 100.

offset

(optional) (character scalar) Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'

opt_fields

(optional) (list) Defines fields to return. Some requests return compact representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.

Value

The task is the basic object around which many operations in Asana are centered.

Property Class Description
gid character scalar Globally unique identifier of the resource, as a string.
resource_type character scalar The base type of this resource.
name character scalar The name of the task.
resource_subtype character scalar The subtype of this resource. Different subtypes retain many of the same fields and behavior, but may render differently in Asana or represent resources with different semantic meaning. The resource_subtype milestone represent a single moment in time. This means tasks with this subtype cannot have a start_date.

Get multiple users

Description

Returns the user records for all users in all workspaces and organizations accessible to the authenticated user. Accepts an optional workspace ID parameter. Results are sorted by user ID.

Usage

asn_get_users(limit, offset, opt_fields, team, workspace)

Arguments

limit

(optional) (integer scalar) Results per page. The number of objects to return per page. The value must be between 1 and 100.

offset

(optional) (character scalar) Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. 'Note: You can only pass in an offset that was returned to you via a previously paginated request.'

opt_fields

(optional) (list) Defines fields to return. Some requests return compact representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options.

team

(optional) (character scalar) The team ID to filter users on.

workspace

(optional) (character scalar) The workspace or organization ID to filter users on.

Value

A user object represents an account in Asana that can be given access to various workspaces, projects, and tasks.

Property Class Description
gid character scalar Globally unique identifier of the resource, as a string.
resource_type character scalar The base type of this resource.
name character scalar Read-only except when same user as requester. The user’s name.