def trigger!(event_name, data, socket_id = nil)
      params = {}
      if socket_id
        validate_socket_id(socket_id)
        params[:socket_id] = socket_id
      end
      @client.trigger(name, event_name, data, params)
    end
def trigger!(event_name, data, socket_id = nil)
      params = {}
      if socket_id
        validate_socket_id(socket_id)
        params[:socket_id] = socket_id
      end
      @client.trigger(name, event_name, data, params)
    end
Trigger event

 [Deprecated] This method will be removed in a future gem version. Please
 switch to Pusher.trigger or Pusher::Client#trigger instead

 @example
   begin
     Pusher['my-channel'].trigger!('an_event', {:some => 'data'})
   rescue Pusher::Error => e
     # Do something on error
   end

 @param data [Object] Event data to be triggered in javascript.
   Objects other than strings will be converted to JSON
 @param socket_id Allows excluding a given socket_id from receiving the
   event - see http://pusher.com/docs/publisher_api_guide/publisher_excluding_recipients for more info

 @raise [Pusher::Error] on invalid Pusher response - see the error message for more details
 @raise [Pusher::HTTPError] on any error raised inside http client - the original error is available in the original_error attribute