/*!*/
// Copyright 2012 Splunk, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License"): you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.

(function() {
    "use strict";
    
    var Service         = require('./service');
    var Http            = require('./http');
    var Paths           = require('./paths').Paths;
    var utils           = require('./utils');
    var base64          = require('../contrib/base64');

    var root = exports || this;
    var StormService = null;
    
    /**
     * Provides a root access point to the Splunk Storm REST API.
     *
     * @class splunkjs.StormService
     * @extends splunkjs.Service
     */
    module.exports = root = StormService = Service.extend({
        init: function(http, params) {
            if (!(http instanceof Http) && !params) {
                // Move over the params
                params = http;
                http = null;
            }
            
            params = params || {};
            
            var username = params.token || params.username || null;
            var password = "x";
            
            // Set up the parameters
            params.paths         = Paths.storm;
            params.scheme        = "https";
            params.host          = "api.splunkstorm.com";
            params.port          = 443;
            params.sessionKey    = base64.encode(username + ":x");
            params.authorization = "Basic";
            
            // Initialize
            this._super.call(this, http, params);
            
            // Override computed parameters
            this.prefix = this.scheme + "://" + this.host + ":" + this.port + "/1";
        },
        
        log: function(event, params, callback) {
            if (!callback && utils.isFunction(params)) {
                callback = params;
                params = {};
            }
            
            callback = callback || function() {};
            params = params || {};
            
            if (!params.project && !params.index) {
                throw new Error("Cannot submit events to Storm without specifying a project");
            }
            
            if (params.project) {
                params.index = params.project;
                delete params["project"];
            }
            
            if (utils.isObject(event)) {
                event = JSON.stringify(event);
            }
            
            return this._super(event, params, callback);
        }
    });  
})();
@@ -1158,16 +1158,456 @@
 xtend(%7B%0A
+        /**%0A         * Constructor for %60splunkjs.StormService%60.%0A         *%0A         * @constructor%0A         * @param %7Bsplunkjs.Http%7D http An instance of a %60splunkjs.Http%60 class.%0A         * @param %7BObject%7D params A dictionary of parameters: %0A         *      * %60token%60: The API token for Storm.%0A         * @return %7Bsplunkjs.StormService%7D A new %60splunkjs.StormService%60 instance.%0A         *%0A         * @method splunkjs.StormService%0A         */%0A
         
@@ -2559,32 +2559,1240 @@
     %7D,%0A        %0A
+        /**%0A         * Logs an event to Splunk Storm. %0A         *%0A         * @example%0A         *%0A         *     storm.log(%0A         *         %22MY AWESOME LOG MESSAGE%22, %0A         *         %7Bproject: %22XYZ123%22, sourcetype: %22GO%22%7D,%0A         *         function(err, response) %7B%0A         *             console.log(%22DATA IS IN STORM!%22);         %0A         *         %7D%0A         *     );%0A         *%0A         * @param %7BString%7CObject%7D event The text for this event or an object that will be converted to JSON.%0A         * @param %7BObject%7D params A dictionary of parameters for indexing: %0A         *      * %60project%60: The project to send events from this input to (use your project token).%0A         *      * %60host%60: The value to populate in the host field for events from this data input. %0A         *      * %60source%60: The source value to fill in the metadata for this input's events.%0A         *      * %60sourcetype%60: The sourcetype to apply to events from this input.%0A         *      * %60TZ%60: The timezone to apply to events.%0A         * @param %7BFunction%7D callback A function to call when the event is submitted: %60(err, result)%60.%0A         *%0A         * @endpoint inputs/http%0A         * @method splunkjs.StormService%0A         */%0A
         log: fun

Add more appropriate docs for StormService