Class G.c.r.Requester:

Part of GTG.core.requester View In Hierarchy

A view on a GTG datastore.

Requester is a stateless object that simply provides a nice API for user interfaces to use for datastore operations.

Multiple Requesters can exist on the same datastore, so they should never have state of their own.

Method __init__ Construct a Requester.
Method connect Undocumented
Method has_task Does the task 'tid' exist?
Method get_task Get the task with the given tid.
Method new_task Create a new task.
Method delete_task Delete the task 'tid'.
Method get_tasks_list Return a list of tids of tasks.
Method get_active_tasks_list Return a list of task ids for all active tasks.
Method get_closed_tasks_list Return a list of task ids for closed tasks.
Method get_notes_list Return a list of task ids for notes.
Method new_tag Create a new tag called 'tagname'.
Method get_tag Undocumented
Method get_all_tags Return a list of every tag that was ever used.
Method get_notag_tag Undocumented
Method get_alltag_tag Undocumented
Method get_used_tags Return tags currently used by a task.
def __init__(self, datastore):
Construct a Requester.
def connect(self, signal, func):
Undocumented
def has_task(self, tid):
Does the task 'tid' exist?
def get_task(self, tid):
Get the task with the given tid.

If no such task exists, create it and force the tid to be tid.

ParameterstidThe task id.
ReturnsA task.
def new_task(self, pid=None, tags=None, newtask=True):
Create a new task.

Note: this modifies the datastore.

ParameterspidThe project where the new task will be created.
tagsThe tags for the new task. If not provided, then the task will have no tags.
newtaskTrue if this is creating a task, False if importing an existing task.
def delete_task(self, tid):
Delete the task 'tid'.

Note: this modifies the datastore.

ParameterstidThe id of the task to be deleted.
def get_tasks_list(self, tags=None, status='Active', notag_only=False, started_only=True, is_root=False):
Return a list of tids of tasks.

By default, returns a list of all the tids of all active tasks.

ParameterstagsA list of tags. If provided, restricts the list of returned tasks to those that have one or more of these tags.
statusA list of statuses. If provided, restricts the list of returned tasks to those that are in one of these states.
notag_onlyIf True, only include tasks without tags. Defaults to False.
started_onlyIf True, only include tasks that have been started. That is, tasks that have an already-passed start date or tasks with no startdate. Defaults to True.
is_rootIf True, only include tasks that have no parent in the current selection. Defaults to False.
ReturnsA list of task ids (tids).
def get_active_tasks_list(self, tags=None, notag_only=False, started_only=True, is_root=False, workable=False):
Return a list of task ids for all active tasks.

See get_tasks_list for more information about the parameters.

ParametersworkableIf True, then only include tasks with no pending subtasks and that can be done directly and exclude any tasks that have a nonworkview tag which is not explicitly provided in the tags parameter. Defaults to False.
def get_closed_tasks_list(self, tags=None, notag_only=False, started_only=False, is_root=False):
Return a list of task ids for closed tasks.

"Closed" means either "done", "dismissed" or "deleted".

See get_tasks_list for more information about the parameters.

def get_notes_list(self, tags=None, notag_only=False):
Return a list of task ids for notes.

See `get_tasks_list` for more information about the parameters.

def new_tag(self, tagname):
Create a new tag called 'tagname'.

Note: this modifies the datastore.

ParameterstagnameThe name of the new tag.
ReturnsThe newly-created tag.
def get_tag(self, tagname):
Undocumented
def get_all_tags(self):
Return a list of every tag that was ever used.
def get_notag_tag(self):
Undocumented
def get_alltag_tag(self):
Undocumented
def get_used_tags(self):
Return tags currently used by a task.
ReturnsA list of tags used by a task.
API Documentation for GTG, generated by pydoctor at 2009-07-19 21:37:32.