A python wrapper for the AgileTask API
- http://doc.agiletask.me/get_tasks.html
- .GetAll()
- http://doc.agiletask.me/get_today.html
- .GetToday()
- http://doc.agiletask.me/get_icebox.html
- .GetIcebox()
- http://doc.agiletask.me/get_single.html
- .GetSingle( <Task ID> )
- http://doc.agiletask.me/get_completed.html
- .GetCompleted()
- http://doc.agiletask.me/get_achievements.html
- .GetRecentAchievements()
- http://doc.agiletask.me/get_new_achievements.html
- .GetAllAchievements()
- http://doc.agiletask.me/new_tasks.html
- .AddTask( <name>, icebox = 'true|false', <position>, complete = 'true|false' )
- http://doc.agiletask.me/delete_tasks.html
- .DeleteTask( <Task ID> )
- http://doc.agiletask.me/update_tasks.html
- .UpdateTask( <Task ID>[, <name> [, <icebox>[<position>[, <complete>]]]], task = <Task Object> )
- Note: You have to provide either the task object or some combination of name, icebox, position and complete
- Note: <Task Object> is a python dictionary representation of a simple task.
{ 'task' : { 'name' : <name>, 'icebox' : <icebox>, 'position' : <position>, 'complete' : <complete> } }
- .UpdateTask( <Task ID>[, <name> [, <icebox>[<position>[, <complete>]]]], task = <Task Object> )
- .MoveTaskToIcebox( <Task ID> )
- .MoveTaskToToday( <Task ID> )
- .CompleteTask( <Task ID> )
from AgileTaskAPI import AgileTaskAPI
patapi = AgileTaskAPI( '<Your Agile Task API Key>' )
for task in patapi.GetToday():
print task['task']['name']
newTask = patapi.AddTask( 'Super cool awesome task text goes here!', icebox = 'false' )
newTask['task']['name'] = "Cool task #tyghe is #awesome"
newTask['task']['icebox'] = 'true'
oldTask = patapi.UpdateTask( newTask['task']['id'], task = newTask )
updatedTaskDef = { 'task' : { 'name' : "Cool task #tyghe is #awesome", 'icebox' : 'false', 'complete' : 'false', 'position' : 0 } }
oldTask = patapi.UpdateTask( newTask['task']['id'], task = updatedTaskDef )
Note: that you have to provide all 4 task keys if you make a task from scratch and update that way
deletedTask = patapi.DeleteTask( oldTask['task']['id'] )
You can add the path to pyAgileTaskAPI like this before you import the module
import sys
sys.path.append( '<Path to pyAgileTaskAPI folder>' )