Class: SleepRoom::Record::API::RoomAPI
- Inherits:
-
Object
- Object
- SleepRoom::Record::API::RoomAPI
- Defined in:
- lib/sleeproom/record/api/room_api.rb
Instance Method Summary collapse
- #broadcast_host ⇒ Object
- #broadcast_key ⇒ Object
- #get(task: Async::Task.current) ⇒ Object
-
#initialize(room_url_key) ⇒ RoomAPI
constructor
A new instance of RoomAPI.
- #live? ⇒ Boolean
- #room_id ⇒ Object
- #room_name ⇒ Object
Constructor Details
Instance Method Details
#broadcast_host ⇒ Object
25 26 27 |
# File 'lib/sleeproom/record/api/room_api.rb', line 25 def broadcast_host @json["broadcast_host"].to_s end |
#broadcast_key ⇒ Object
21 22 23 |
# File 'lib/sleeproom/record/api/room_api.rb', line 21 def broadcast_key @json["broadcast_key"].to_s end |
#get(task: Async::Task.current) ⇒ Object
13 14 15 |
# File 'lib/sleeproom/record/api/room_api.rb', line 13 def get(task: Async::Task.current) @json = API.get(@url).wait end |
#live? ⇒ Boolean
17 18 19 |
# File 'lib/sleeproom/record/api/room_api.rb', line 17 def live? @json["is_live"] end |
#room_id ⇒ Object
29 30 31 |
# File 'lib/sleeproom/record/api/room_api.rb', line 29 def room_id @json["room_id"] end |
#room_name ⇒ Object
33 34 35 |
# File 'lib/sleeproom/record/api/room_api.rb', line 33 def room_name @json["room_name"] end |