Add notes to the tracks backend API
I like to be able to add a new todo using the backend API. Unfortunately the API is not able to add notes to the todo. Ruby On Rails turns out to make this very simple:
- in todo_api.rb add notes to the api:
:expects => [{:username => :string}, {:token => :string}, {:context_id => :int}, {:description => :string}, {:notes => :string}]
- in backend_controler.api change the def to add notes
def new_todo(username, token, context_id, description, notes)
- and assign it to the new todo right before it is saved:
item.notes = notes
that is it!
In the perl script add a line to get the body of the email:
my $notes = $mail->body();
and feed it to the api:
my $request = $client->call('NewTodo', $username, $token, $context_id, $description, $notes);
Left to do:
- create a filter on the subject to place an action directly in the right context and/or project
- be able to process mime email to filter out the text/html or text/plain variant updateDone, here.