Sha256: 92b5b9c370ff148a82878b8319917efa9f41f2c5a0d6b569f02f2957acee067e

Contents?: true

Size: 877 Bytes

Versions: 1

Compression:

Stored size: 877 Bytes

Contents

module Todoist
  module Sync
    class Notes
        include Todoist::Util  

        # Return a Hash of notes where key is the id of a note and value is a note
        def collection
          return ApiHelper.collection("notes")
        end

        # 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.
        def add(args)
          return ApiHelper.add(args, "note_add")
        end

        # Update a note given a hash of attributes
        def update(args)
          return ApiHelper.command(args, "note_update")
        end

        # Delete notes given an a note
        def delete(note)
          args = {id: note.id}
          return ApiHelper.command(args, "note_delete")
        end

      
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
todoist-ruby-0.1.3 lib/todoist/sync/notes.rb