 jsonrpc = require './jsonrpc.coffee'
 {EventEmitter} = require 'events'
+Fs = require 'fs'
+http = require 'http'
 
 class TimelineEvent extends EventEmitter
     constructor : (@otherweb)->

                            @makeRequest "#{name}.#{functionName}",[params],callback
                    else
                        @makeRequest "#{name}.#{functionName}",[],params


    benchRequest : (path,params,benchcallback)->


class OTHERWebInstance
    constructor : (@userAgent,@rootURL,@username,@password)->
        @data = {}
        @requestQueue=[]
        @client = new jsonrpc("#{@rootURL}/gateway/api/jsonrpc.jsp")
        @keepaliveTimeout=null
        if @username and @password
            @loginStatus = "incomplete"
        else
            @loginStatus = "complete"

    compileObject : (name,functions)->
        callinstance = @[name]={}
