public static TeamWorkClient Make(string apiKey, bool slow, string baseUrl = null) { instance = new TeamWorkClient(); if (!string.IsNullOrEmpty(baseUrl)) instance.BaseUrl = new UriBuilder(baseUrl).Uri.ToString(); instance.ApiKey = apiKey; instance.Slow = slow; OnCreated(EventArgs.Empty); return instance; }
public static TeamWorkClient Make(string apiKey, bool slow, string baseUrl = null) { instance = new TeamWorkClient(); if (!string.IsNullOrEmpty(baseUrl)) { instance.BaseUrl = new UriBuilder(baseUrl).Uri.ToString(); } instance.ApiKey = apiKey; instance.Slow = slow; OnCreated(EventArgs.Empty); return(instance); }
public ApiWrapper(TeamWorkClient client) { this.client = client; this.secsPerTry = (client.Slow ? 60 : 15); this.cred = new NetworkCredential(client.ApiKey, "X"); }