Beispiel #1
0
        public static DumpRequest CreateGetRequest(string gameId, string publicKey, string username, string userToken, string key)
        {
            var output = new DumpRequest(gameId, publicKey, Constants.DataStoreUrls.GetUrl);

            output.Parameters.Add(RequestParameter.CreateKey(key));
            if (string.IsNullOrWhiteSpace(username))
            {
                return(output);
            }

            if (string.IsNullOrWhiteSpace(userToken))
            {
                throw new ArgumentException("You must specify a user token when retrieving user keys.");
            }
            output.Parameters.Add(RequestParameter.CreateUsername(username));
            output.Parameters.Add(RequestParameter.CreateUserToken(userToken));

            return(output);
        }