You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some functions sometimes but not always convert their result to be a data frame, which make them difficult to program against and to reason about.
For example asn_tasks_find_by_project() will return a tibble if there are tasks in the project, but returns a list of class asana_api otherwise.
To reproduce,
library(asana)
library(dcasana)
library(dplyr)
team_content_quality_gid<- dc_get_teams() %>%
filter(name=="Content Quality") %>%
pull(gid)
test_project<- asn_projects_create_in_team(
team=team_content_quality_gid,
name="test-autogenerated-project",
notes="This is a test. Please delete this project."
)
# There are no tasks in the project, so the return value is a listtest_project_gid<-test_project$content$data$gid
asn_tasks_find_by_project(project_id=test_project_gid)
#> <Asana /projects/1127053277614384/tasks>#> List of 1#> $ data: list()# Once you add a task, you get a tibbletest_task<- asn_tasks_create(
projects=test_project$content$data$gid,
name='Test Task 1'
)
asn_tasks_find_by_project(project_id=test_project_gid)
#> # A tibble: 1 x 4#> id gid name resource_type#> <chr> <chr> <chr> <chr> #> 1 1127053162816649 1127053162816649 Test Task 1 task
The text was updated successfully, but these errors were encountered:
Some functions sometimes but not always convert their result to be a data frame, which make them difficult to program against and to reason about.
For example
asn_tasks_find_by_project()
will return a tibble if there are tasks in the project, but returns a list of classasana_api
otherwise.To reproduce,
The text was updated successfully, but these errors were encountered: