Source

stacky / trunk / source / Stacky / StackyClientBase.cs

Diff from to

File trunk/source/Stacky/StackyClientBase.cs

     {
         public IProtocol Protocol { get; set; }
         public string SiteUrlName { get; set; }
+        public string ApiKey { get; set; }
 
         public int RemainingRequests { get; internal set; }
         public int MaxRequests { get; internal set; }
                 return UnixDateTime.UnixTimeFromDate(date.Value);
             return null;
         }
+
+        protected void EnsureApiKey(IDictionary<string, string> queryStringArguments)
+        {
+            if (!String.IsNullOrEmpty(ApiKey) && !queryStringArguments.ContainsKey("key"))
+            {
+                queryStringArguments.Add("key", ApiKey);
+            }
+        }
     }
 }