Sha256: 9d5f8fc7106b131caadd77dc172bbb9c9d25b4f2e9ffab21a5d29f0f75da78c6

Contents?: true

Size: 1.54 KB

Versions: 72

Compression:

Stored size: 1.54 KB

Contents

Social::InstagramPostPresenter = ImmutableStruct.new(
    :user_full_name,
    :user_id,
    :user_profile_picture_url,
    :user_username,
    :id,
    :text,
    :filter,
    :id,
    :low_res_image_url,
    :low_res_image_height,
    :low_res_image_width,
    :standard_res_image_url,
    :standard_res_image_height,
    :standard_res_image_width,
    :thumbnail_image_url,
    :thumbnail_res_image_height,
    :thumbnail_res_image_width,
    :url,
    :created_time
  ) do

    def self.from_instagram_post(post)
      self.new(user_profile_picture_url: post.user.profile_picture,
               user_full_name: post.user.full_name,
               user_id: post.user.id,
               user_username: post.user.username,
               id: post.id,
               created_time: Time.at(post.created_time.to_i),
               text: post.caption.text,
               filter: post.filter,
               low_res_image_url: post.images.low_resolution.url,
               low_res_image_height: post.images.low_resolution.height,
               low_res_image_width: post.images.low_resolution.width,
               standard_res_image_url: post.images.standard_resolution.url,
               standard_res_image_height: post.images.standard_resolution.height,
               standard_res_image_width: post.images.standard_resolution.width,
               thumbnail_image_url: post.images.thumbnail.url,
               thumbnail_image_height: post.images.thumbnail.height,
               thumbnail_image_width: post.images.thumbnail.width,
               url: post.link)

    end
  end

Version data entries

72 entries across 72 versions & 1 rubygems

Version Path
trusty-festivity-extension-2.6.3 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.6.2 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.6.1 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.6 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.19 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.18 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.17 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.16 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.15 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.14 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.13 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.12 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.11 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.10 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.9 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.8 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.7 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.6 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.5 app/presenters/social/instagram_post_presenter.rb
trusty-festivity-extension-2.5.4 app/presenters/social/instagram_post_presenter.rb