Module: Pair::Api
Instance Method Summary collapse
Instance Method Details
#create_session(session) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/pair/api.rb', line 15 def create_session(session) setup do post("/v1/sessions", { :body => { :session => { :name => session.name, :viewers => session.viewers, :participants => session.participants, :tunnel => { :host_login => session.host_login } } } }) end end |
#join_session(session) ⇒ Object
32 33 34 35 36 37 |
# File 'lib/pair/api.rb', line 32 def join_session(session) setup do = { :query => { :name => session.name, :host => session.host, :format => "json" } } get("/v1/sessions/search.json", ) end end |