Comment out lots of code in main

still not finished
This commit is contained in:
2024-02-06 18:09:07 +01:00
parent 5ccdefb233
commit deafc497e6
+15 -15
View File
@@ -31,17 +31,17 @@ if __name__ == "__main__":
# 1. you need to login to get a session and a list of accounts # 1. you need to login to get a session and a list of accounts
auth = ACAuthenticator() auth = ACAuthenticator()
session = auth.login(username, password) session = auth.login(username, password)
# pprint(session) pprint(session)
user = session['user'] user = session['user']
# use first account # use first account
account = auth.find_account(account_name) account = auth.find_account(account_name)
# 2. you need to get a token for this account # 2. you need to get a token for this account
token = ACTokenAuthenticator(account, user).issue_token_intent() # token = ACTokenAuthenticator(account, user).issue_token_intent()
pprint(token) # pprint(token)
# 3. now you can query the API # 3. now you can query the API
ac = ACClient(account, token) # ac = ACClient(account, token)
# get a list of all projects # get a list of all projects
# res = ac.get_projects() # res = ac.get_projects()
@@ -49,20 +49,20 @@ if __name__ == "__main__":
# get task with sub tasks # get task with sub tasks
# https://app.activecollab.com/416910/projects/310/tasks/6274 # https://app.activecollab.com/416910/projects/310/tasks/6274
project_id = 310 # project_id = 310
task_id = 6281 # task_id = 6281
task_res = ac.get_project_task(project_id, task_id) # task_res = ac.get_project_task(project_id, task_id)
pprint(task_res.json()) # pprint(task_res.json())
task = task_res.json() # task = task_res.json()
# res = ac.unassign_all_sub_task(task) # res = ac.unassign_all_sub_task(task)
# create a new subtask for the task without assignment # create a new subtask for the task without assignment
subtask = { # subtask = {
"task_id": task_id, # "task_id": task_id,
"project_id": project_id, # "project_id": project_id,
"assignee_id": "", # "assignee_id": "",
"body": "test qqq" # "body": "test qqq"
} # }
# res = ac.create_subtask(subtask) # res = ac.create_subtask(subtask)
# pprint(res.json()) # pprint(res.json())