class Todoist::Sync::Notes

Public Instance Methods

add(args) click to toggle source

Add a note with a given hash of attributes and returns the note id.

Please note that item_id or project_id key is required. In addition, content is also a required key in the hash.

# File lib/todoist/sync/notes.rb, line 14
def add(args)
  return @client.api_helper.add(args, "note_add")
end
collection() click to toggle source

Return a Hash of notes where key is the id of a note and value is a note

# File lib/todoist/sync/notes.rb, line 7
def collection
  return @client.api_helper.collection("notes")
end
delete(note) click to toggle source

Delete notes given an a note

# File lib/todoist/sync/notes.rb, line 24
def delete(note)
  args = {id: note.id}
  return @client.api_helper.command(args, "note_delete")
end
update(args) click to toggle source

Update a note given a hash of attributes

# File lib/todoist/sync/notes.rb, line 19
def update(args)
  return @client.api_helper.command(args, "note_update")
end