def __init__(self, item_id=None, query=None, t_filter=None): self.__name__ = "show" if item_id or query is not None: if query is None: self.query = None else: self.query = p.url_encode(query) if item_id is None: self.item_id = None else: self.id = p.url_encode(item_id) #pylint: disable=invalid-name else: raise Exception("Either item_id or query must be specified.") if t_filter is None: self.t_filter = None else: self.t_filter = p.url_encode(t_filter) self.callback_url = t.callback_from_obj(self) self = t.x_call_handler(self) #pylint: disable=self-cls-assignment
def __init__(self, query): self.__name__ = "search" if isinstance(query, str): self.query = query else: raise "Search params must be valid strings." self.callback_url = t.callback_from_obj(self) self = t.x_call_handler(self) #pylint: disable=self-cls-assignment
def __init__(self, data): self.__name__ = "json" try: for item in data: json.dumps(item) except ValueError as err: raise Exception( "Data must be valid JSON. Error: {}".format(err)) from err # For whatever reason these need to be the actual characters self.data = urllib.parse.quote(str(json.dumps(data)), safe=':,') self.callback_url = t.callback_from_obj(self) self = t.x_call_handler(self) #pylint: disable=self-cls-assignment
def __init__( #pylint: disable=too-many-arguments, too-many-locals self, auth_token, task_id, title=None, notes=None, prepend_notes=None, append_notes=None, when=None, deadline=None, tags=None, add_tags=None, area_id=None, area=None, completed=None, canceled=None, reveal=None, duplicate=False, creation_date=None, completion_date=None): self.__name__ = "update-project" self.id = p.TaskId(task_id).task_id #pylint: disable=invalid-name self.auth_token = p.AuthToken(auth_token).auth_token self.title = p.Title(title).title self.notes = p.Notes(notes).notes self.prepend_notes = p.PrependNotes(prepend_notes).prepend_notes self.append_notes = p.AppendNotes(append_notes).append_notes self.when = p.When(when).when self.deadline = p.Deadline(deadline).deadline self.tags = p.Tags(tags).tags self.add_tags = p.AddTags(add_tags).add_tags self.area_id = p.AreaId(area_id).area_id self.area = p.Area(area).area self.completed = p.Completed(completed).completed self.canceled = p.Canceled(canceled).canceled self.reveal = p.Reveal(reveal).reveal self.duplicate = p.Duplicate(duplicate).duplicate self.creation_date = p.CreationDate(creation_date).creation_date self.completion_date = p.CompletionDate( completion_date).completion_date self.callback_url = t.callback_from_obj(self) self = t.x_call_handler(self) #pylint: disable=self-cls-assignment
def __init__( #pylint: disable=too-many-arguments, too-many-locals self, title=None, titles=None, notes=None, when=None, deadline=None, tags=None, checklist_items=None, list_id=None, list_str=None, heading=None, completed=None, canceled=None, show_quick_entry=None, reveal=None, creation_date=None, completion_date=None, activate_app=None): self.__name__ = "add" self.title = p.Title(title).title self.titles = p.Titles(titles).titles self.notes = p.Notes(notes).notes self.when = p.When(when).when self.deadline = p.Deadline(deadline).deadline self.tags = p.Tags(tags).tags self.checklist_items = p.ChecklistItems( checklist_items).checklist_items self.list_id = p.ListId(list_id).list_id self.list = p.List(list_str).list self.heading = p.Heading(heading).heading self.completed = p.Completed(completed).completed self.canceled = p.Canceled(canceled).canceled self.show_quick_entry = p.ShowQuickEntry( show_quick_entry).show_quick_entry self.reveal = p.Reveal(reveal).reveal self.creation_date = p.CreationDate(creation_date).creation_date self.completion_date = p.CompletionDate( completion_date).completion_date self.activate_app = p.ActivateApp(activate_app).activate_app self.callback_url = t.callback_from_obj(self) self = t.x_call_handler(self) #pylint: disable=self-cls-assignment
def __init__( #pylint: disable=too-many-arguments, too-many-locals self, title=None, titles=None, notes=None, when=None, deadline=None, tags=None, area_id=None, area=None, to_dos=None, completed=None, canceled=None, reveal=None, creation_date=None, completion_date=None): self.__name__ = "add-project" self.title = p.Title(title).title self.titles = p.Titles(titles).titles self.notes = p.Notes(notes).notes self.when = p.When(when).when self.deadline = p.Deadline(deadline).deadline self.tags = p.Tags(tags).tags self.area_id = p.AreaId(area_id).area_id self.area = p.Area(area).area self.to_dos = p.ToDos(to_dos).to_dos self.completed = p.Completed(completed).completed self.canceled = p.Canceled(canceled).canceled self.reveal = p.Reveal(reveal).reveal self.creation_date = p.CreationDate(creation_date).creation_date self.completion_date = p.CompletionDate( completion_date).completion_date self.callback_url = t.callback_from_obj(self) self = t.x_call_handler(self) #pylint: disable=self-cls-assignment
def __init__(self): self.__name__ = "version" self.callback_url = t.callback_from_obj(self) self = t.x_call_handler(self) #pylint: disable=self-cls-assignment
def __init__( #pylint: disable=too-many-arguments, too-many-locals self, auth_token, task_id, title=None, titles=None, notes=None, prepend_notes=None, append_notes=None, when=None, deadline=None, tags=None, add_tags=None, checklist_items=None, prepend_checklist_items=None, append_checklist_items=None, list_id=None, list_str=None, heading=None, completed=None, canceled=None, show_quick_entry=None, reveal=None, duplicate=False, creation_date=None, completion_date=None): self.__name__ = "update" self.id = p.TaskId(task_id).task_id #pylint: disable=invalid-name self.auth_token = p.AuthToken(auth_token).auth_token self.title = p.Title(title).title self.titles = p.Titles(titles).titles self.notes = p.Notes(notes).notes self.prepend_notes = p.PrependNotes(prepend_notes).prepend_notes self.append_notes = p.AppendNotes(append_notes).append_notes self.when = p.When(when).when self.deadline = p.Deadline(deadline).deadline self.tags = p.Tags(tags).tags self.add_tags = p.AddTags(add_tags).add_tags self.checklist_items = p.ChecklistItems( checklist_items).checklist_items self.prepend_checklist_items = p.PrependChecklistItems( prepend_checklist_items).prepend_checklist_items self.append_checklist_items = p.AppendChecklistItems( append_checklist_items).append_checklist_items self.list_id = p.ListId(list_id).list_id self.list = p.List(list_str).list self.heading = p.Heading(heading).heading self.completed = p.Completed(completed).completed self.canceled = p.Canceled(canceled).canceled self.show_quick_entry = p.ShowQuickEntry( show_quick_entry).show_quick_entry self.reveal = p.Reveal(reveal).reveal self.duplicate = p.Duplicate(duplicate).duplicate self.creation_date = p.CreationDate(creation_date).creation_date self.completion_date = p.CompletionDate( completion_date).completion_date self.callback_url = t.callback_from_obj(self) self = t.x_call_handler(self) #pylint: disable=self-cls-assignment