From 7b3b078bb1adcf0e10beb582afa18516ce95c18c Mon Sep 17 00:00:00 2001 From: Leonardo Crauss Daronco Date: Sat, 11 Jan 2014 18:04:58 -0200 Subject: [PATCH] Remove join_meeting, should always use join_meeting_url join_meeting was a method that actually sent the join request to the server. But there's no real use for this method. In practice, the application gets the join url (via join_meeting_url) and redirects the user to this url. refs #1129 --- examples/join_example.rb | 8 -------- lib/bigbluebutton_api.rb | 18 ------------------ spec/bigbluebutton_api_spec.rb | 24 ------------------------ 3 files changed, 50 deletions(-) diff --git a/examples/join_example.rb b/examples/join_example.rb index 7145d6a..5a0ac27 100644 --- a/examples/join_example.rb +++ b/examples/join_example.rb @@ -45,14 +45,6 @@ puts "Meeting info:" puts response.inspect - puts - puts - puts - puts "---------------------------------------------------" - response = @api.join_meeting(meeting_id, attendee_name, options[:attendeePW]) - puts "Join meeting response:" - puts response.inspect - rescue Exception => ex puts "Failed with error #{ex.message}" puts ex.backtrace diff --git a/lib/bigbluebutton_api.rb b/lib/bigbluebutton_api.rb index 08d283f..77f71e2 100644 --- a/lib/bigbluebutton_api.rb +++ b/lib/bigbluebutton_api.rb @@ -226,24 +226,6 @@ def join_meeting_url(meeting_id, user_name, password, options={}) get_url(:join, params) end - # Warning: As of this version of the gem, this call does not work - # (instead of returning XML response, it should join the meeting). - # - # Joins a user into the meeting using an API call, instead of - # directing the user's browser to moderator_url or attendee_url - # (note: this will still be required however to actually use bbb). - # Returns the URL a user can use to enter this meeting. - # meeting_id (string):: Unique identifier for the meeting - # user_name (string):: Name of the user - # password (string):: Moderator or attendee password for this meeting - # options (Hash):: Hash with additional parameters. The accepted parameters are: - # userID (string), webVoiceConf (string) and createTime (int). - # For details about each see BigBlueButton's API docs. - def join_meeting(meeting_id, user_name, password, options={}) - params = { :meetingID => meeting_id, :password => password, :fullName => user_name }.merge(options) - send_api_request(:join, params) - end - # Returns a hash object containing the information of a meeting. # # meeting_id (string):: Unique identifier for the meeting diff --git a/spec/bigbluebutton_api_spec.rb b/spec/bigbluebutton_api_spec.rb index 70704de..50a262d 100644 --- a/spec/bigbluebutton_api_spec.rb +++ b/spec/bigbluebutton_api_spec.rb @@ -220,30 +220,6 @@ end end - describe "#join_meeting" do - context "standard case" do - let(:params) { - { :meetingID => "meeting-id", :password => "pw", :fullName => "Name", - :userID => "id123", :webVoiceConf => 12345678, :createTime => 9876543 } - } - - before { api.should_receive(:send_api_request).with(:join, params).and_return("join-return") } - it { - options = { :userID => "id123", :webVoiceConf => 12345678, :createTime => 9876543 } - api.join_meeting("meeting-id", "Name", "pw", options).should == "join-return" - } - end - - context "accepts non standard options" do - let(:params) { - { :meetingID => "meeting-id", :password => "pw", - :fullName => "Name", :userID => "id123", :nonStandard => 1 } - } - before { api.should_receive(:send_api_request).with(:join, params) } - it { api.join_meeting("meeting-id", "Name", "pw", params) } - end - end - describe "#get_meeting_info" do let(:meeting_id) { "meeting-id" } let(:password) { "password" }