Example #1
0
        private Models.Task[] GetTasks(string urlPath, TasksQuery query)
        {
            if (query != null)
            {
                urlPath = query.PopulateRequestQueryString(urlPath);
            }

            Models.Task[] nameAndIdOnly = ObjectConversions.ToTasks(ExecuteRequest(urlPath));
            if (nameAndIdOnly == null)
            {
                return(null);
            }

            if (query == null || query.ReturnCompleteTaskRecords == false)
            {
                return(nameAndIdOnly);
            }

            Models.Task[] ret = new Models.Task[nameAndIdOnly.Length];
            Parallel.For(0, nameAndIdOnly.Length, i =>
            {
                ret[i] = GetTask(nameAndIdOnly[i].Id);
            });
            return(ret);
        }
Example #2
0
 public Models.Task GetTask(long taskId)
 {
     return(ObjectConversions.ToTask(ExecuteRequest("/tasks/" + taskId.ToString())));
 }
Example #3
0
 private Workspace[] GetWorkspaces(string urlPath)
 {
     return(ObjectConversions.ToWorkspaces(ExecuteRequest(urlPath)));
 }
Example #4
0
 private Story[] GetStories(string urlPath, OptionalFields[] returnedFields = null)
 {
     return(ObjectConversions.ToStories(
                ExecuteRequest(urlPath, returnedFields, ",created_at,id,text,source,type,created_by,created_by.name,target.completed")
                ));
 }
Example #5
0
 private User[] GetUsers(string urlPath, OptionalFields[] returnedFields)
 {
     return(ObjectConversions.ToUsers(ExecuteRequest(urlPath, returnedFields, ",name,id")));
 }
Example #6
0
 private User GetUser(string userId)
 {
     return(ObjectConversions.ToUser(ExecuteRequest("/users/" + userId)));
 }
Example #7
0
        private Project GetProject(string urlPath, OptionalFields[] returnedFields)
        {
            dynamic dProject = MakeRequest(urlPath, returnedFields);

            return(ObjectConversions.ToProject(dProject));
        }