Skip to content

Latest commit

 

History

History
77 lines (54 loc) · 2.57 KB

README.markdown

File metadata and controls

77 lines (54 loc) · 2.57 KB

pyAgileTaskAPI

A python wrapper for the AgileTask API

API

ToDo

  • .MoveTaskToIcebox( <Task ID> )
  • .MoveTaskToToday( <Task ID> )
  • .CompleteTask( <Task ID> )

Examples

Initialize the API

from AgileTaskAPI import AgileTaskAPI

patapi = AgileTaskAPI( '<Your Agile Task API Key>' )

Print Today's Tasks

for task in patapi.GetToday():
	print task['task']['name']

Add New Task to Top of Today's Tasks

newTask = patapi.AddTask( 'Super cool awesome task text goes here!', icebox = 'false' )

Update added task's name and move it to the icebox

newTask['task']['name'] = "Cool task #tyghe is #awesome"
newTask['task']['icebox'] = 'true'
oldTask = patapi.UpdateTask( newTask['task']['id'], task = newTask )

You can also make an entirely new task with changed values like this

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

Delete a task

deletedTask = patapi.DeleteTask( oldTask['task']['id'] )

Tips

Python Path

You can add the path to pyAgileTaskAPI like this before you import the module

import sys
sys.path.append( '<Path to pyAgileTaskAPI folder>' )