Exemple #1
0
 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;
 }
Exemple #2
0
 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);
 }
Exemple #3
0
 public ApiWrapper(TeamWorkClient client)
 {
     this.client     = client;
     this.secsPerTry = (client.Slow ? 60 : 15);
     this.cred       = new NetworkCredential(client.ApiKey, "X");
 }