public static NewEntity Create(this ITodoListsContract contract, Int64 projectId, TodoListNew list)
 {
     return contract.Create(projectId.ToString(), list);
 }
        public void TodoLists()
        {
            Console.WriteLine();
            Console.WriteLine("TodoLists Contract Tests");
            Console.WriteLine("************************");

            var projectService = this.Client.Projects;
            var companyService = this.Client.Companies;
            var peopleService = this.Client.People;

            var project = projectService.GetList().FirstOrDefault();

            if (project == null)
            {
                Console.WriteLine("No projects exists under this account");
                return;
            }

            Console.WriteLine("Project Name: {0}", project.Name);

            var service = this.Client.TodoLists;

            var todoLists = service.GetList();

            Console.WriteLine("Todo Lists Count: {0}", todoLists.Count());

            var todoLists2 = service.GetListInProject(project.Id, TodoListFilter.All);

            Console.WriteLine("Todo Lists In Project: {1}; Count: {0}", todoLists2.Count(), project.Name);

            var me = peopleService.Me();
            var todoLists3 = service.GetListByResponsiblePerson(me.Id);

            Console.WriteLine("Todo Lists By Me: {1}; Count: {0}", todoLists3.Count(), me.FirstName);

            var company = companyService.GetListInProject(project.Id).FirstOrDefault();
            var todoLists4 = service.GetListByResponsibleCompany(company.Id);

            Console.WriteLine("Todo Lists By Company: {1}; Count: {0}", todoLists4.Count(), company.Name);

            var list = new TodoListNew { Description = "Testing", Name = "Test 123", Private = true, Tracked = false };
            var id = service.Create(project.Id, list);
            var newTodoList = service.Get(id.Id);

            Console.WriteLine("New List: {0}", newTodoList.Name);

            list.Name = "Test 2";
            service.Update(id.Id, list);
            var updateTodoList = service.Get(id.Id);

            Console.WriteLine("Update List: {0}", updateTodoList.Name);

            service.Delete(id.Id);

            Console.WriteLine("List Deleted");
        }
 public static void Update(this ITodoListsContract contract, Int64 todoListId, TodoListNew list)
 {
     contract.Update(todoListId.ToString(), list);
 }