Class: PatientZero::Analytics::Instagram
- Inherits:
-
Base
- Object
- Base
- PatientZero::Analytics::Instagram
show all
- Defined in:
- lib/patient_zero/analytics/instagram.rb
Instance Attribute Summary
Attributes inherited from Base
#end_date, #source_id, #start_date, #token
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #messages, #name, #platform, #total_posts
Methods included from Client
#connection, #get, included, #parse, #post, #put
Instance Method Details
#engagements ⇒ Object
4
5
6
|
# File 'lib/patient_zero/analytics/instagram.rb', line 4
def engagements
@engagements ||= messages.reduce(0) { |sum, message| sum + message.engagements }
end
|
#followers ⇒ Object
12
13
14
|
# File 'lib/patient_zero/analytics/instagram.rb', line 12
def followers
analytical_data['total_followers'].to_i
end
|
#impressions ⇒ Object
8
9
10
|
# File 'lib/patient_zero/analytics/instagram.rb', line 8
def impressions
@impressions ||= messages.reduce(0) { |sum, message| sum + message.impressions }
end
|
#impressions_by_city ⇒ Object
20
21
22
|
# File 'lib/patient_zero/analytics/instagram.rb', line 20
def impressions_by_city
{}
end
|
#likes ⇒ Object
24
25
26
|
# File 'lib/patient_zero/analytics/instagram.rb', line 24
def likes
analytical_data['total_likes'].to_i
end
|
#reach ⇒ Object
16
17
18
|
# File 'lib/patient_zero/analytics/instagram.rb', line 16
def reach
nil
end
|
28
29
30
|
# File 'lib/patient_zero/analytics/instagram.rb', line 28
def
analytical_data['total_comments'].to_i
end
|