lib/protolink/protonet.rb in protolink-0.2.3 vs lib/protolink/protonet.rb in protolink-0.2.4

- old
+ new

@@ -59,9 +59,19 @@ # Find a Channel by name def find_channel_by_name(name) response = get("/api/v1/channels/#{name}") Channel.new(self, response) if response end + + def create_rendezvous(first_user_id, second_user_id) + response = post('/api/v1/rendezvous', :body => { :first_user_id => first_user_id, :second_user_id => second_user_id } ) + Channel.new(self, response) if response + end + + def find_rendezvous(first_user_id, second_user_id) + response = get('/api/v1/rendezvous', :query => {:first_user_id => first_user_id, :second_user_id => second_user_id}) + Channel.new(self, response) if response + end # USERS # Get an array of all the available users def users