Beispiel #1
0
        public static DumpRequest CreateUpdateRequest(string gameId, string publicKey, string username, string userToken, string key, DataStoreOperation operation, string value)
        {
            var output = new DumpRequest(gameId, publicKey, Constants.DataStoreUrls.UpdateUrl, RequestParameter.CreateKey(key), RequestParameter.CreateOperation(operation), RequestParameter.CreateValue(value));

            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);
        }