Module: SocialMiner::Instagram::ProfileMapper
- Defined in:
- lib/social_miner/instagram/profile_mapper.rb
Class Method Summary collapse
Class Method Details
.map(attrs) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/social_miner/instagram/profile_mapper.rb', line 6 def map(attrs) { social_id: attrs.fetch("id"), description: attrs["biography"], username: attrs.fetch("username"), full_name: attrs.fetch("full_name"), avatar_url: attrs.fetch("profile_pic_url"), followers: Helpers::Hash.fetch_nested(attrs, "edge_followed_by", "count"), following: Helpers::Hash.fetch_nested(attrs, "edge_follow", "count") } end |