Class: SRL::Player
Overview
A registered user of SpeedRunsLive.com
Instance Attribute Summary collapse
-
#api ⇒ Object
Streaming platform used by this player.
-
#channel ⇒ Object
readonly
– Stream information for the player ++ This player’s profile name on a streaming service.
-
#name ⇒ Object
readonly
This player’s registered name on SpeedRunsLive.
-
#oid ⇒ Object
(also: #player_id)
readonly
Returns the value of attribute oid.
-
#twitter ⇒ Object
readonly
This player’s Twitter name.
-
#youtube ⇒ Object
readonly
This player’s YouTube channel.
Instance Method Summary collapse
-
#exists? ⇒ Boolean
Does this player exist?.
-
#stream ⇒ Object
URL to this player’s stream.
Methods included from Unmarshalable
Instance Attribute Details
#api ⇒ Object
Streaming platform used by this player. For example: Twitch.
20 21 22 |
# File 'lib/srl/player.rb', line 20 def api @api end |
#channel ⇒ Object (readonly)
– Stream information for the player ++ This player’s profile name on a streaming service.
17 18 19 |
# File 'lib/srl/player.rb', line 17 def channel @channel end |
#name ⇒ Object (readonly)
This player’s registered name on SpeedRunsLive.
- NOTE
-
This might not be the same name that he has registered on IRC.
11 12 13 |
# File 'lib/srl/player.rb', line 11 def name @name end |
#oid ⇒ Object (readonly) Also known as: player_id
Returns the value of attribute oid.
6 7 8 |
# File 'lib/srl/player.rb', line 6 def oid @oid end |
#twitter ⇒ Object (readonly)
This player’s Twitter name.
29 30 31 |
# File 'lib/srl/player.rb', line 29 def twitter @twitter end |
#youtube ⇒ Object (readonly)
This player’s YouTube channel.
26 27 28 |
# File 'lib/srl/player.rb', line 26 def youtube @youtube end |
Instance Method Details
#exists? ⇒ Boolean
Does this player exist?
40 41 42 |
# File 'lib/srl/player.rb', line 40 def exists? player_id != 0 end |
#stream ⇒ Object
URL to this player’s stream.
- FIXME
-
Add support for non-twitch streams.
34 35 36 37 |
# File 'lib/srl/player.rb', line 34 def stream api == :twitch ? "https://twitch.tv/#{channel}/" : 'Unsupported' end |