예제 #1
0
        /// <summary>
        ///     Create initial parameters collection with populated apiKey parameter
        /// </summary>
        /// <param name="configuration">configuration</param>
        /// <returns>parameters collection</returns>
        public static IList <KeyValuePair <string, string> > CreateApiKeyParameter(GigyaConfiguration configuration)
        {
            var result = new List <KeyValuePair <string, string> >();

            result.AddParameter("apiKey", configuration.ApiKey);

            return(result);
        }
예제 #2
0
        /// <summary>
        ///     Create initial parameters collection with populated auth parameters
        /// </summary>
        /// <param name="configuration">configuration</param>
        /// <returns>parameters collection</returns>
        public static IList <KeyValuePair <string, string> > CreateAuthParameters(GigyaConfiguration configuration)
        {
            var result = CreateApiKeyParameter(configuration)
                         .AddParameter("secret", configuration.SecretKey);

            if (!string.IsNullOrEmpty(configuration.UserKey))
            {
                result.AddParameter("userKey", configuration.UserKey);
            }

            return(result);
        }