Class: Twitch::V2::Game
- Inherits:
-
Object
- Object
- Twitch::V2::Game
- Defined in:
- lib/kappa/game.rb
Overview
Games are categories (e.g. League of Legends, Diablo 3) used by streams and channels. Games can be searched for by query.
Instance Attribute Summary collapse
-
#box_images ⇒ Images
readonly
Set of images for the game's box art.
-
#channel_count ⇒ Fixnum
readonly
Total number of channels currently streaming this game on Twitch.
-
#giantbomb_id ⇒ Fixnum
readonly
Unique game ID for GiantBomb.com.
-
#id ⇒ Fixnum
readonly
Unique Twitch ID.
-
#logo_images ⇒ Images
readonly
Set of images for the game's logo.
-
#name ⇒ String
readonly
User-friendly game name.
-
#viewer_count ⇒ Fixnum
readonly
Total number of viewers across all channels currently watching this game on Twitch.
Instance Method Summary collapse
-
#streams(options = {}) {|stream| ... } ⇒ Array<Stream>?
Get streams for this game.
Instance Attribute Details
#box_images ⇒ Images (readonly)
Returns Set of images for the game's box art.
68 69 70 |
# File 'lib/kappa/game.rb', line 68 def box_images @box_images end |
#channel_count ⇒ Fixnum (readonly)
Returns Total number of channels currently streaming this game on Twitch.
76 77 78 |
# File 'lib/kappa/game.rb', line 76 def channel_count @channel_count end |
#giantbomb_id ⇒ Fixnum (readonly)
Returns Unique game ID for GiantBomb.com.
65 66 67 |
# File 'lib/kappa/game.rb', line 65 def giantbomb_id @giantbomb_id end |
#id ⇒ Fixnum (readonly)
Returns Unique Twitch ID.
55 56 57 |
# File 'lib/kappa/game.rb', line 55 def id @id end |
#logo_images ⇒ Images (readonly)
Returns Set of images for the game's logo.
71 72 73 |
# File 'lib/kappa/game.rb', line 71 def logo_images @logo_images end |
#name ⇒ String (readonly)
Returns User-friendly game name.
60 61 62 |
# File 'lib/kappa/game.rb', line 60 def name @name end |
#viewer_count ⇒ Fixnum (readonly)
Returns Total number of viewers across all channels currently watching this game on Twitch.
81 82 83 |
# File 'lib/kappa/game.rb', line 81 def viewer_count @viewer_count end |
Instance Method Details
#streams(options = {}) {|stream| ... } ⇒ Array<Stream>?
Get streams for this game.
48 49 50 |
# File 'lib/kappa/game.rb', line 48 def streams( = {}, &block) @query.streams.find(.merge(:game => @name), &block) end |