Class: Osu::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/osu/data.rb

Overview

An event, which is delivered in the users payload when they score in the top 1000 plays on a beatmap

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Event


119
120
121
122
123
124
125
# File 'lib/osu/data.rb', line 119

def initialize(data)
  @display_html = data['display_html']
  @beatmap_id = data['beatmap_id'].to_i
  @beatmapset_id = data['beatmapset_id'].to_i
  @date = Time.parse data['date']
  @epicfactor = data['epicfactor'].to_i
end

Instance Attribute Details

#beatmap_idInteger (readonly)


108
109
110
# File 'lib/osu/data.rb', line 108

def beatmap_id
  @beatmap_id
end

#beatmapset_idInteger (readonly)


111
112
113
# File 'lib/osu/data.rb', line 111

def beatmapset_id
  @beatmapset_id
end

#dateTime (readonly)


114
115
116
# File 'lib/osu/data.rb', line 114

def date
  @date
end

#display_htmlString (readonly)


105
106
107
# File 'lib/osu/data.rb', line 105

def display_html
  @display_html
end

#epicfactorInteger (readonly)


117
118
119
# File 'lib/osu/data.rb', line 117

def epicfactor
  @epicfactor
end