Class: PatientZero::Monitoring::Twitter

Inherits:
Object
  • Object
show all
Includes:
Client
Defined in:
lib/patient_zero/monitoring/twitter.rb

Constant Summary collapse

VALID_DAYS =
[1,7,30]

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Client

#connection, #get, included, #parse, #post, #put

Constructor Details

#initialize(profile_id:, days: nil) ⇒ Twitter

Returns a new instance of Twitter.



9
10
11
12
# File 'lib/patient_zero/monitoring/twitter.rb', line 9

def initialize profile_id:, days: nil
  @profile_id = profile_id
  @days = set_to_valid_days days
end

Instance Attribute Details

#daysObject (readonly)

Returns the value of attribute days.



7
8
9
# File 'lib/patient_zero/monitoring/twitter.rb', line 7

def days
  @days
end

#profile_idObject (readonly)

Returns the value of attribute profile_id.



7
8
9
# File 'lib/patient_zero/monitoring/twitter.rb', line 7

def profile_id
  @profile_id
end

Instance Method Details

#top_citiesObject



14
15
16
# File 'lib/patient_zero/monitoring/twitter.rb', line 14

def top_cities
  statistical_data['top_cities']
end