Class: RsApi::MonthlyXp
- Inherits:
-
Runemetrics
- Object
- Runemetrics
- RsApi::MonthlyXp
- Defined in:
- lib/rs_api/runemetrics/monthly_xp.rb
Overview
For obtaining monthly xp data for a user.
Defined Under Namespace
Classes: MissingPlayerData
Constant Summary
Constants included from SkillHelper
SkillHelper::MAX, SkillHelper::MONTHLY_XP_SKILL_ID_CONST, SkillHelper::SKILL_ID_CONST
Instance Attribute Summary
Attributes inherited from Runemetrics
Instance Method Summary collapse
-
#previous_monthly_xp_data ⇒ Object
def display; end.
- #raw_data ⇒ Object
Methods inherited from Runemetrics
Methods included from PlayerNameHelper
Constructor Details
This class inherits a constructor from RsApi::Runemetrics
Instance Method Details
#previous_monthly_xp_data ⇒ Object
def display; end
16 17 18 19 20 |
# File 'lib/rs_api/runemetrics/monthly_xp.rb', line 16 def previous_monthly_xp_data # # Last entry is this current month # # Therefore, previous month is second to last entry raw_data.map { |data| data.last['monthData'][-2] } end |
#raw_data ⇒ Object
22 23 24 25 |
# File 'lib/rs_api/runemetrics/monthly_xp.rb', line 22 def raw_data # Data is a hash of the last 12 months of data for each key skill_name @raw_data ||= request_all_data end |