Class: BrightData::LinkedIn::Types::Post

Inherits:
Data
  • Object
show all
Defined in:
lib/brightdata/linkedin/types/post.rb

Overview

Note:

Use #raw to access fields not yet typed by this gem.

Typed representation of a LinkedIn post response.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#comments_countObject (readonly)

Returns the value of attribute comments_count

Returns:

  • (Object)

    the current value of comments_count



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

#date_postedObject (readonly)

Returns the value of attribute date_posted

Returns:

  • (Object)

    the current value of date_posted



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

Returns the value of attribute embedded_links

Returns:

  • (Object)

    the current value of embedded_links



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

#hashtagsObject (readonly)

Returns the value of attribute hashtags

Returns:

  • (Object)

    the current value of hashtags



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

#headlineObject (readonly)

Returns the value of attribute headline

Returns:

  • (Object)

    the current value of headline



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

#imagesObject (readonly)

Returns the value of attribute images

Returns:

  • (Object)

    the current value of images



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

#likesObject (readonly)

Returns the value of attribute likes

Returns:

  • (Object)

    the current value of likes



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

#original_postObject (readonly)

Returns the value of attribute original_post

Returns:

  • (Object)

    the current value of original_post



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

#post_textObject (readonly)

Returns the value of attribute post_text

Returns:

  • (Object)

    the current value of post_text



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

#rawObject (readonly)

Returns the value of attribute raw

Returns:

  • (Object)

    the current value of raw



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

#repostObject (readonly)

Returns the value of attribute repost

Returns:

  • (Object)

    the current value of repost



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

#user_idObject (readonly)

Returns the value of attribute user_id

Returns:

  • (Object)

    the current value of user_id



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

#videosObject (readonly)

Returns the value of attribute videos

Returns:

  • (Object)

    the current value of videos



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/brightdata/linkedin/types/post.rb', line 37

Post = Data.define(
  :id, :user_id, :headline, :post_text, :date_posted, :hashtags,
  :embedded_links, :images, :videos, :likes, :comments_count,
  :repost, :original_post, :raw
) do
  # Build a post from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Post]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      id: hash[:id],
      user_id: hash[:user_id],
      headline: hash[:headline],
      post_text: hash[:post_text],
      date_posted: hash[:date_posted],
      hashtags: hash[:hashtags],
      embedded_links: hash[:embedded_links],
      images: hash[:images],
      videos: hash[:videos],
      likes: hash[:likes],
      comments_count: hash[:comments_count],
      repost: hash[:repost],
      original_post: hash[:original_post],
      raw: hash
    )
  end
end

Class Method Details

.from_api(hash) ⇒ BrightData::LinkedIn::Types::Post

Build a post from a symbol-keyed API response.

Parameters:

  • hash (Hash)

    symbolized-key API response object

Returns:



46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/brightdata/linkedin/types/post.rb', line 46

def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
  new(
    id: hash[:id],
    user_id: hash[:user_id],
    headline: hash[:headline],
    post_text: hash[:post_text],
    date_posted: hash[:date_posted],
    hashtags: hash[:hashtags],
    embedded_links: hash[:embedded_links],
    images: hash[:images],
    videos: hash[:videos],
    likes: hash[:likes],
    comments_count: hash[:comments_count],
    repost: hash[:repost],
    original_post: hash[:original_post],
    raw: hash
  )
end