Title: | Create and Manage Todolist using 'Todoist.com' API |
---|---|
Description: | Allows you to interact with the API of the "Todoist" platform. 'Todoist' <https://todoist.com/> provides an online task manager service for teams. |
Authors: | Cervan Girard [cre, aut] , Vincent Guyader [aut] , ThinkR [cph, fnd] |
Maintainer: | Cervan Girard <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.9007 |
Built: | 2024-11-19 06:11:46 UTC |
Source: | https://github.com/ThinkR-open/rtodoist |
Add a new project
add_project(project_name, verbose = TRUE, token = get_todoist_api_token())
add_project(project_name, verbose = TRUE, token = get_todoist_api_token())
project_name |
name of the new project |
verbose |
boolean that make the function verbose |
token |
todoist API token |
id of the new project
## Not run: add_project("my_proj") ## End(Not run)
## Not run: add_project("my_proj") ## End(Not run)
Add responsible to a task
add_responsible_to_task( project_id = get_project_id(project_name = project_name, token = token), project_name, responsible, task, verbose = FALSE, all_users = get_all_users(token = token), token = get_todoist_api_token() )
add_responsible_to_task( project_id = get_project_id(project_name = project_name, token = token), project_name, responsible, task, verbose = FALSE, all_users = get_all_users(token = token), token = get_todoist_api_token() )
project_id |
id of the project |
project_name |
name of the project |
responsible |
add someone to this task with mail |
task |
the full name of the task |
verbose |
boolean that make the function verbose |
all_users |
all_users |
token |
todoist API token |
http request
add section
add_section( section_name, project_id = get_project_id(project_name = project_name, token = token), project_name, force = FALSE, token = get_todoist_api_token() )
add_section( section_name, project_id = get_project_id(project_name = project_name, token = token), project_name, force = FALSE, token = get_todoist_api_token() )
section_name |
section name |
project_id |
id of the project |
project_name |
name of the project |
force |
boolean force section creation even if already exist |
token |
todoist API token |
Add tasks in project
add_tasks_in_project( project_id = get_project_id(project_name = project_name, token = token), tasks, project_name, verbose = FALSE, responsible = NULL, due = NULL, section_name = NULL, token = get_todoist_api_token(), all_users = get_all_users(token = token), update_only = FALSE, check_only = FALSE, que_si_necessaire = TRUE )
add_tasks_in_project( project_id = get_project_id(project_name = project_name, token = token), tasks, project_name, verbose = FALSE, responsible = NULL, due = NULL, section_name = NULL, token = get_todoist_api_token(), all_users = get_all_users(token = token), update_only = FALSE, check_only = FALSE, que_si_necessaire = TRUE )
project_id |
id of the project |
tasks |
tasks to add, as character vector |
project_name |
name of the project |
verbose |
boolean that make the function verbose |
responsible |
add people in project |
due |
due date |
section_name |
section name |
token |
todoist API token |
all_users |
all_users |
update_only |
boolean if true, only update existing (not closed) todo |
check_only |
check_only |
que_si_necessaire |
que_si_necessaire |
id of project (character vector)
## Not run: add_project("my_proj") %>% add_tasks_in_project(c("First task", "Second task")) ## End(Not run)
## Not run: add_project("my_proj") %>% add_tasks_in_project(c("First task", "Second task")) ## End(Not run)
Add tasks in project
add_tasks_in_project_from_df( project_id = get_project_id(project_name = project_name, token = token), tasks_as_df, project_name, verbose = FALSE, token = get_todoist_api_token(), update_only = FALSE, check_only = FALSE, que_si_necessaire = TRUE, all_users = get_all_users(token = token) )
add_tasks_in_project_from_df( project_id = get_project_id(project_name = project_name, token = token), tasks_as_df, project_name, verbose = FALSE, token = get_todoist_api_token(), update_only = FALSE, check_only = FALSE, que_si_necessaire = TRUE, all_users = get_all_users(token = token) )
project_id |
id of the project |
tasks_as_df |
data.frame of tasks with c("tasks_list","responsible","due","section_name") names |
project_name |
name of the project |
verbose |
boolean that make the function verbose |
token |
todoist API token |
update_only |
boolean if true only update existing (not closed) todo |
check_only |
boolean if true only return number of task to add |
que_si_necessaire |
que_si_necessaire |
all_users |
all_users |
id of project (character vector)
[add_tasks_in_project()]
Add one user
add_user_in_project( project_id = get_project_id(project_name = project_name, token = token), mail, project_name, verbose = TRUE, token = get_todoist_api_token() )
add_user_in_project( project_id = get_project_id(project_name = project_name, token = token), mail, project_name, verbose = TRUE, token = get_todoist_api_token() )
project_id |
id of the project |
mail |
mail of the user |
project_name |
name of the project |
verbose |
boolean that make the function verbose |
token |
token |
id of project (character vector)
## Not run: get_project_id("test") %>% add_user_in_project("[email protected]") ## End(Not run)
## Not run: get_project_id("test") %>% add_user_in_project("[email protected]") ## End(Not run)
Add a list of users
add_users_in_project( project_id = get_project_id(project_name = project_name, token = token), users_email, project_name, verbose = TRUE, all_users = get_all_users(token = token), token = get_todoist_api_token() )
add_users_in_project( project_id = get_project_id(project_name = project_name, token = token), users_email, project_name, verbose = TRUE, all_users = get_all_users(token = token), token = get_todoist_api_token() )
project_id |
id of the project |
users_email |
emails of user as character vector |
project_name |
name of the project |
verbose |
boolean that make the function verbose |
all_users |
all_users |
token |
token |
id of project (character vector)
Pop-up to save the token
ask_todoist_api_token(msg = "Register Todoist Api Token")
ask_todoist_api_token(msg = "Register Todoist Api Token")
msg |
message to print in the pop-up |
password (character vector)
Call the good version of API
call_api( ..., url = "https://todoist.com/api/v9/sync", token = get_todoist_api_token() )
call_api( ..., url = "https://todoist.com/api/v9/sync", token = get_todoist_api_token() )
... |
any params of POST request |
url |
url to call |
token |
todoist API token |
list
Call project data
call_api_project_data( ..., url = "https://api.todoist.com/sync/v9/projects/get_data" )
call_api_project_data( ..., url = "https://api.todoist.com/sync/v9/projects/get_data" )
... |
any params of POST request |
url |
url to call |
list
Delete todoist api token
delete_todoist_api_token()
delete_todoist_api_token()
nothing, delete the api token
Collect all the objects in a list. This allows you to explore your to-do list.
get_all_data(token = get_todoist_api_token())
get_all_data(token = get_todoist_api_token())
token |
todoist API token |
list of all objects
## Not run: # Set API key first set_todoist_api_token() # Get all objects objects <- get_all_data() ## End(Not run)
## Not run: # Set API key first set_todoist_api_token() # Get all objects objects <- get_all_data() ## End(Not run)
List of projects
get_all_projects(token = get_todoist_api_token())
get_all_projects(token = get_todoist_api_token())
token |
todoist API token |
list of all projects
## Not run: # Set API key first set_todoist_api_token() # Get all projects projects <- get_all_projects() ## End(Not run)
## Not run: # Set API key first set_todoist_api_token() # Get all projects projects <- get_all_projects() ## End(Not run)
Get a tibble with emails and ids of users
get_all_users(token = get_todoist_api_token())
get_all_users(token = get_todoist_api_token())
token |
token |
tibble of users
## Not run: get_users() ## End(Not run)
## Not run: get_users() ## End(Not run)
This function gives you the id of a project by name, which is useful for adding tasks or people to the project.
get_project_id( project_name, all_projects = get_all_projects(token = token), token = get_todoist_api_token(), create = TRUE, verbose = FALSE )
get_project_id( project_name, all_projects = get_all_projects(token = token), token = get_todoist_api_token(), create = TRUE, verbose = FALSE )
project_name |
name of the project |
all_projects |
result of get_all_projects |
token |
todoist API token |
create |
boolean create project if needed |
verbose |
boolean that make the function verbose |
id of project (character vector)
## Not run: get_all_projects() %>% get_project_id("test") ## End(Not run)
## Not run: get_all_projects() %>% get_project_id("test") ## End(Not run)
get id section
get_section_id( project_id = get_project_id(project_name = project_name, token = token), project_name, section_name, token = get_todoist_api_token(), all_section = get_section_from_project(project_id = project_id, token = token) )
get_section_id( project_id = get_project_id(project_name = project_name, token = token), project_name, section_name, token = get_todoist_api_token(), all_section = get_section_from_project(project_id = project_id, token = token) )
project_id |
id of the project |
project_name |
name of the project |
section_name |
name of the section |
token |
token |
all_section |
all_section |
List of tasks
get_tasks(token = get_todoist_api_token())
get_tasks(token = get_todoist_api_token())
token |
todoist API token |
list of all tasks
## Not run: # Set API key first set_todoist_api_token() # Get all tasks tasks <- get_tasks() ## End(Not run)
## Not run: # Set API key first set_todoist_api_token() # Get all tasks tasks <- get_tasks() ## End(Not run)
List of tasks of project
get_tasks_of_project( project_id = get_project_id(project_name = project_name, token = token), project_name, token = get_todoist_api_token() )
get_tasks_of_project( project_id = get_project_id(project_name = project_name, token = token), project_name, token = get_todoist_api_token() )
project_id |
id of the project |
project_name |
name of the project |
token |
todoist API token |
list of all tasks
Return the todoist API token. If this is the first time, you will need to setup your token.
get_todoist_api_token(ask = TRUE)
get_todoist_api_token(ask = TRUE)
ask |
booleen do we have to ask if missing |
token (character vector)
## Not run: get_todoist_api_token() ## End(Not run)
## Not run: get_todoist_api_token() ## End(Not run)
Get users id
get_users_id( mails, all_users = get_all_users(token = token), token = get_todoist_api_token() )
get_users_id( mails, all_users = get_all_users(token = token), token = get_todoist_api_token() )
mails |
mails of the person |
all_users |
all_users |
token |
token |
id of users
Get users in projects
get_users_in_project( project_id = get_project_id(project_name = project_name, token = token), project_name, token = get_todoist_api_token() )
get_users_in_project( project_id = get_project_id(project_name = project_name, token = token), project_name, token = get_todoist_api_token() )
project_id |
id of the project |
project_name |
name of the project |
token |
token |
dataframe of users in projects
Open todoist website
open_todoist_website_profile(verbose = TRUE)
open_todoist_website_profile(verbose = TRUE)
verbose |
boolean that make the function verbose |
open integration webpage from todoist website
open_todoist_website_profile()
open_todoist_website_profile()
Random key
random_key()
random_key()
key
random key generate with digest
This function use keyring to store your token from your todoist profile. To find your token from todoist website, use open_todoist_website_profile
set_todoist_api_token(token)
set_todoist_api_token(token)
token |
todoist API token |
token
Remove the old token and register a new one.
update_todoist_api_token()
update_todoist_api_token()
nothing, storing your token