Method: Gnip::Activity#to_h

Defined in:
lib/gnip_api/gnip/activity.rb

#to_hObject

[View source]

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/gnip_api/gnip/activity.rb', line 27

def to_h
  {
    :id => @id,
    :objectType => @object_type,
    :actor => @actor.to_h,
    :verb => @verb,
    :postedTime => @posted_time,
    :generator => @generator,
    :provider => @provider,
    :link => @link,
    :body => @body,
    :object => @object.kind_of?(Gnip::Activity) ? @object.to_h : @object,
    :favoritesCount => @favorites_count,
    :twitter_entities => @twitter_entities,
    :twitter_filter_level => @twitter_filter_level,
    :twitter_lang => @twitter_lang,
    :retweetCount => @retweet_count,
    :gnip => @gnip ? @gnip.to_h : nil
  }
end