private async static Task <TreeNode[]> GetList(string endpoint) { IList <TreeNode> nodes = new List <TreeNode>(); IList <Item> hubs = await RestAPI <IList <Item> > .RequestAsync(endpoint, true); foreach (Item hub in hubs) { TreeNode node = new TreeNode(hub.Text); node.Tag = hub.ID; nodes.Add(node); } return(nodes.ToArray()); }
public static async Task <User> UserNameAsync() { return(await RestAPI <User> .RequestAsync("/api/forge/user/profile", true)); }
public static async Task <bool> IsSessionValid() { return(await RestAPI <bool> .RequestAsync("/api/forge/session/isvalid", true)); }