Module: Snafu::Achievements
- Included in:
- Client
- Defined in:
- lib/snafu/achievements.rb
Instance Method Summary collapse
Instance Method Details
#achievement_count ⇒ Object
12 13 14 15 |
# File 'lib/snafu/achievements.rb', line 12 def achievement_count response = self.call("achievements.listAll") response["total"] end |
#get_achievements ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/snafu/achievements.rb', line 3 def get_achievements result = [] response = self.call("achievements.listAll", :per_page => self.achievement_count) response["items"].each do |achievement| result << Models::Achievement.new(achievement[1]) end result end |