public void Delete(IronCow.Rest.RestClient.VoidCallback callback) { if (Syncing && IsSynced) { RestRequest request = new RestRequest("rtm.tasks.notes.delete", (r) => { callback(); }); request.Parameters.Add("timeline", Owner.GetTimeline().ToString()); request.Parameters.Add("note_id", Id.ToString()); Owner.ExecuteRequest(request); } }
public void Unarchive(VoidCallback callback) { if (Syncing) { if (GetFlag(TaskListFlags.Archived)) { RestRequest request = new RestRequest("rtm.lists.unarchive"); request.Parameters.Add("timeline", Owner.GetTimeline().ToString()); request.Parameters.Add("list_id", Id.ToString()); request.Callback = (response) => { callback(); }; Owner.ExecuteRequest(request); SetFlag(TaskListFlags.Archived, false); } } SetFlag(TaskListFlags.Archived, false); }
public void Edit(string title, string body, IronCow.Rest.RestClient.VoidCallback callback) { if (Syncing && IsSynced) { RestRequest request = new RestRequest("rtm.tasks.notes.edit", (r) => { Title = title; Body = body; callback(); }); request.Parameters.Add("timeline", Owner.GetTimeline().ToString()); request.Parameters.Add("note_id", Id.ToString()); request.Parameters.Add("note_title", title); request.Parameters.Add("note_text", body); Owner.ExecuteRequest(request); } }