public Task Get <AsanaT>(AsanaWorkspace arg1, AsanaCollectionResponseEventHandler callback) where AsanaT : AsanaObject { AsanaRequest request = default(AsanaRequest); if (typeof(AsanaT) == typeof(AsanaUser)) { request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetUsersInWorkspace), arg1); return(request.Go((o, h) => PackAndSendResponseCollection <AsanaUser>(o, callback), ErrorCallback)); } if (typeof(AsanaT) == typeof(AsanaProject)) { request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetProjectsInWorkspace), arg1); return(request.Go((o, h) => PackAndSendResponseCollection <AsanaProject>(o, callback), ErrorCallback)); } if (typeof(AsanaT) == typeof(AsanaTag)) { request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTagsInWorkspace), arg1); return(request.Go((o, h) => PackAndSendResponseCollection <AsanaTag>(o, callback), ErrorCallback)); } if (typeof(AsanaT) == typeof(AsanaTeam)) { request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTeamsInWorkspace), arg1); return(request.Go((o, h) => PackAndSendResponseCollection <AsanaTeam>(o, callback), ErrorCallback)); } throw new TypeAccessException("Unknown type for this request: " + typeof(AsanaT).Name); }
public Task Get <AsanaT>(AsanaTag arg1, AsanaCollectionResponseEventHandler callback) where AsanaT : AsanaObject { AsanaRequest request = default(AsanaRequest); if (typeof(AsanaT) == typeof(AsanaTask)) { request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTasksByTag), arg1); return(request.Go((o, h) => PackAndSendResponseCollection <AsanaTask>(o, callback), ErrorCallback)); } throw new TypeAccessException("Unknown type for this request: " + typeof(AsanaT).Name); }
/// <summary> /// Packs the data and into a collection object and sends it to the callback /// </summary> /// <typeparam name="T"></typeparam> /// <param name="callback"></param> internal void PackAndSendResponseCollection <T>(string rawData, AsanaCollectionResponseEventHandler callback) where T : AsanaObject { var k = GetDataAsDictArray(rawData); AsanaObjectCollection collection = new AsanaObjectCollection(); foreach (var j in k) { var t = AsanaObject.Create(typeof(T)); Parsing.Deserialize(j, t, this); collection.Add(t); } callback(collection); }
public Task GetUsers(AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetUsers)); return request.Go((o, h) => PackAndSendResponseCollection<AsanaUser>(o, callback), ErrorCallback); }
public Task GetTasksInAProject(AsanaProject arg1, AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTasksInAProject), arg1); return request.Go((o, h) => PackAndSendResponseCollection<AsanaTask>(o, callback), ErrorCallback); }
public void GetTagsInWorkspace(AsanaWorkspace arg1, AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTagsInWorkspace), arg1); request.Go((o, h) => PackAndSendResponseCollection <AsanaTag>(o, callback), ErrorCallback); }
public void GetWorkspaces(AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetWorkspaces)); request.Go((o, h) => PackAndSendResponseCollection <AsanaWorkspace>(o, callback), ErrorCallback); }
public void GetTasksInAProject(AsanaProject arg1, AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTasksInAProject), arg1); request.Go((o, h) => PackAndSendResponseCollection <AsanaTask>(o, callback), ErrorCallback); }
public void GetProjectsInWorkspace(AsanaWorkspace arg1, AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetProjectsInWorkspace), arg1); request.Go((o, h) => PackAndSendResponseCollection<AsanaProject>(o, callback), ErrorCallback); }
public Task GetTagsInWorkspace(AsanaWorkspace arg1, AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTagsInWorkspace), arg1); return request.Go((o, h) => PackAndSendResponseCollection<AsanaTag>(o, callback), ErrorCallback); }
public Task GetProjectsInTeam(AsanaTeam asanaTeam, AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetProjectsInTeam), asanaTeam); return(request.Go((o, h) => PackAndSendResponseCollection <AsanaProject>(o, callback), ErrorCallback)); }
public Task GetTeamsInWorkspace(AsanaWorkspace asanaWorkspace, AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTeamsInWorkspace), asanaWorkspace); return(request.Go((o, h) => PackAndSendResponseCollection <AsanaTeam>(o, callback), ErrorCallback)); }
public Task GetTasksByTag(AsanaTag asanaTag, AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTasksByTag), asanaTag); return(request.Go((o, h) => PackAndSendResponseCollection <AsanaTask>(o, callback), ErrorCallback)); }
public void GetTasksByTag(AsanaTask arg1, AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetTasksByTag), arg1); request.Go((o, h) => PackAndSendResponseCollection<AsanaTask>(o, callback), ErrorCallback); }
public Task GetStoriesInTask(AsanaTask arg1, AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetStoriesInTask), arg1); return request.Go((o, h) => PackAndSendResponseCollection<AsanaStory>(o, callback), ErrorCallback); }
public Task GetSubTasksByParentId(Int64 arg1, AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetSubTasksByParentId), arg1); return request.Go((o, h) => PackAndSendResponseCollection<AsanaTask>(o, callback), ErrorCallback); }
public Task GetUsers(AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetUsers)); return(request.Go((o, h) => PackAndSendResponseCollection <AsanaUser>(o, callback), ErrorCallback)); }
public void GetStoriesInTask(AsanaTask arg1, AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetStoriesInTask), arg1); request.Go((o, h) => PackAndSendResponseCollection <AsanaStory>(o, callback), ErrorCallback); }
public void GetWorkspaces(AsanaCollectionResponseEventHandler callback) { var request = GetBaseRequest(AsanaFunction.GetFunction(Function.GetWorkspaces)); request.Go((o, h) => PackAndSendResponseCollection<AsanaWorkspace>(o, callback), ErrorCallback); }