Sha256: ff8523f2b3890e20d25c0fdf5fbea777b61d9cbf2c1b37322966e277ab223026
Contents?: true
Size: 659 Bytes
Versions: 6
Compression:
Stored size: 659 Bytes
Contents
module Stratify module Twitter module Translation def from_api_hash(api_hash) activity = Stratify::Twitter::Activity.new activity.status_id = api_hash.id activity.username = api_hash.user.screen_name activity.text = api_hash.text activity.created_at = api_hash.created_at if api_hash[:retweeted_status] activity.retweeted_status = { :status_id => api_hash[:retweeted_status].id, :username => api_hash[:retweeted_status].user.screen_name, :text => api_hash[:retweeted_status].text, } end activity end end end end
Version data entries
6 entries across 6 versions & 1 rubygems