Class: Whereby::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/whereby/api.rb

Constant Summary collapse

API_VERSION =
'v1'.freeze
BASE_URL =
"https://api.whereby.dev/#{API_VERSION}".freeze

Instance Method Summary collapse

Instance Method Details

#create_meeting(**options) ⇒ Object

POST /v1/meetings/



17
18
19
# File 'lib/whereby/api.rb', line 17

def create_meeting(**options)
  Meeting.new(whereby_request(:post, 'meetings', options))
end

#delete_meeting(id) ⇒ Object

DELETE /v1/meetings/:id



22
23
24
# File 'lib/whereby/api.rb', line 22

def delete_meeting(id)
  whereby_request(:delete, "meetings/#{id}")
end

#meeting(id) ⇒ Object

GET /v1/meetings/:id



12
13
14
# File 'lib/whereby/api.rb', line 12

def meeting(id)
  Meeting.new(whereby_request(:get, "meetings/#{id}"))
end