public ToDoListItem Create(ToDoListItemCreateRequest createRequest) { //projects/1/todolists/1/todos.json var action = "/projects/{0}/todolists/{1}/todos.json".FormatWith(createRequest.ProjectId, createRequest.ToDoListId); var content = Api.Post <ToDoListItem>(action, createRequest); if (content != null) { content.ProjectId = createRequest.ProjectId; } return(content); }
public ToDoListItem CreateToDo(string content, DateTime?dueAt = null, PersonStub assignee = null) { var createRequest = new ToDoListItemCreateRequest() { ProjectId = this.ProjectId, ToDoListId = this.Id, Content = content, DueAt = dueAt, Assignee = assignee }; var item = Api.ToDoLists.Create(createRequest); return(item); }