Tasks() public method

Gets a paged list of Tasks
public Tasks ( int page, int per_page = 30, StatusEnum statusFilter = StatusEnum.All, System.DateTime from_time = null, System.DateTime to_time = null ) : IList
page int Zero based page index
per_page int Number of results per page
statusFilter StatusEnum Only lists tasks that match this status filter
from_time System.DateTime Lower bound of the time of the task
to_time System.DateTime Upper bound of the time of the task
return IList
示例#1
0
 public void TasksTest()
 {
     IronWorker target = new IronWorker();
     int page = 0; // TODO: Initialize to an appropriate value
     int per_page = 10; // TODO: Initialize to an appropriate value
     StatusEnum statusFilter = StatusEnum.All; // TODO: Initialize to an appropriate value
     DateTime? from_time = null; // TODO: Initialize to an appropriate value
     DateTime? to_time = null; // TODO: Initialize to an appropriate value
     IList<Task> actual;
     actual = target.Tasks(page, per_page, statusFilter, from_time, to_time);
     Assert.IsNotNull(actual);
 }
示例#2
0
        public void TaskTest()
        {
            IronWorker target = new IronWorker();
            var tasks = target.Tasks(per_page: 1);
            Assert.AreEqual(1, tasks.Count);

            string id = tasks[0].Id;
            Task actual;
            actual = target.Task(id);
            Assert.IsNotNull(actual);
            Assert.AreEqual(id, actual.Id);
        }