Skip to content

Commit

Permalink
Remove join_meeting, should always use join_meeting_url
Browse files Browse the repository at this point in the history
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
  • Loading branch information
daronco committed Jan 11, 2014
1 parent c405b12 commit 7b3b078
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 50 deletions.
8 changes: 0 additions & 8 deletions examples/join_example.rb
Expand Up @@ -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
Expand Down
18 changes: 0 additions & 18 deletions lib/bigbluebutton_api.rb
Expand Up @@ -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
Expand Down
24 changes: 0 additions & 24 deletions spec/bigbluebutton_api_spec.rb
Expand Up @@ -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" }
Expand Down

0 comments on commit 7b3b078

Please sign in to comment.