Class: SRL::Player
- Inherits:
-
Object
- Object
- SRL::Player
- Includes:
- Unmarshalable
- Defined in:
- lib/srl/typedefs.rb
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.
272 273 274 |
# File 'lib/srl/typedefs.rb', line 272 def api @api end |
#channel ⇒ Object (readonly)
– Stream information for the player ++ This player’s profile name on a streaming service.
269 270 271 |
# File 'lib/srl/typedefs.rb', line 269 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.
263 264 265 |
# File 'lib/srl/typedefs.rb', line 263 def name @name end |
#oid ⇒ Object (readonly) Also known as: player_id
Returns the value of attribute oid.
258 259 260 |
# File 'lib/srl/typedefs.rb', line 258 def oid @oid end |
#twitter ⇒ Object (readonly)
This player’s Twitter name.
281 282 283 |
# File 'lib/srl/typedefs.rb', line 281 def twitter @twitter end |
#youtube ⇒ Object (readonly)
This player’s YouTube channel.
278 279 280 |
# File 'lib/srl/typedefs.rb', line 278 def youtube @youtube end |
Instance Method Details
#exists? ⇒ Boolean
Does this player exist?
292 293 294 |
# File 'lib/srl/typedefs.rb', line 292 def exists? player_id != 0 end |
#stream ⇒ Object
URL to this player’s stream.
- FIXME
-
Add support for non-twitch streams.
286 287 288 289 |
# File 'lib/srl/typedefs.rb', line 286 def stream api == :twitch ? "https://twitch.tv/#{channel}/" : 'Unsupported' end |