lib/rrj/init.rb in ruby_rabbitmq_janus-1.0.5 vs lib/rrj/init.rb in ruby_rabbitmq_janus-1.0.6
- old
+ new
@@ -36,14 +36,15 @@
# @param [Bollean] exclusive
# Use an exclusive queue or not
# @example Sending an message info
# RubyRabbitmqJanus::RRJ.new.message_simple('base::info')
# #=> {"janus":"server_info","name":"Janus WebRTC Gateway" ... }
- # @return [RubyRabbitmqJanus::Janus::Response] Give an object response to janus server
+ # @return [RubyRabbitmqJanus::Janus::Responses::Standard]
+ # Give an object response to janus server
def message_simple(type = 'base::info', exclusive = false)
Janus::Transactions::Transaction.new(@session).connect(exclusive) do
- Janus::Message.new(type)
+ Janus::Messages::Standard.new(type)
end
end
# Send an message simple in current session.
# @param [String] type
@@ -52,14 +53,15 @@
# @param [Bollean] exclusive
# Use an exclusive queue or not
# @example Sending an message create
# RubyRabbitmqJanus::RRJ.new.message_session('base::create')
# #=> {"janus":"server_info","name":"Janus WebRTC Gateway" ... }
- # @return [RubyRabbitmqJanus::Janus::Response] Give an object response to janus server
+ # @return [RubyRabbitmqJanus::Janus::Responses::Standard]
+ # Give an object response to janus server
def message_session(type, options = {}, exclusive = false)
Janus::Transactions::Session.new(@session).session_connect(exclusive) do
- Janus::Message.new(type, use_current_session?(options))
+ Janus::Messages::Standard.new(type, use_current_session?(options))
end
rescue => error
raise Errors::RRJErrorPost, error
end
@@ -68,14 +70,15 @@
# Given a type to request. JSON request writing in 'config/requests/'
# @param [Hash] options Options update in request
# @example Sending an message create
# RubyRabbitmqJanus::RRJ.new.message_admin('admin::sessions')
# #=> {"janus":"success","sessions": [12345, 8786567465465, ...] }
- # @return [RubyRabbitmqJanus::Janus::Response] Give an object response to janus server
+ # @return [RubyRabbitmqJanus::Janus::Responses::Standard]
+ # Give an object response to janus server
def message_admin(type, options = {})
Janus::Transactions::Admin.new(@session).connect do
- Janus::MessageAdmin.new(type, options.merge!('session_id' => @session))
+ Janus::Messages::Admin.new(type, options.merge!('session_id' => @session))
end
end
# Send an message in handle session in current session.
# @param [String] type
@@ -83,10 +86,11 @@
# @param [Hash] replace Options update in request
# @param [Hash] add Elements adding to request
# @example Sending an message create
# RubyRabbitmqJanus::RRJ.new.message_session('base::create')
# #=> {"janus":"server_info","name":"Janus WebRTC Gateway" ... }
- # @return [RubyRabbitmqJanus::Janus::Response] Give an object response to janus server
+ # @return [RubyRabbitmqJanus::Janus::Responses::Standard]
+ # Give an object response to janus server
def message_handle(type, replace = {}, add = {})
options = { 'replace' => replace, 'add' => add }
@transaction.publish_message_handle(type, options)
end