Class: BrightData::LinkedIn::Types::Post
- Inherits:
-
Data
- Object
- Data
- BrightData::LinkedIn::Types::Post
- 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
-
#comments_count ⇒ Integer, ...
readonly
Comment count.
-
#date_posted ⇒ String?
readonly
Date posted.
-
#embedded_links ⇒ Array<String>?
readonly
Embedded links.
-
#hashtags ⇒ Array<String>?
readonly
Hashtags.
-
#headline ⇒ String?
readonly
Author headline.
-
#id ⇒ String?
readonly
Post ID.
-
#images ⇒ Array<String>?
readonly
Image URLs.
-
#likes ⇒ Integer, ...
readonly
Like count.
-
#original_post ⇒ Hash?
readonly
Original post details.
-
#post_text ⇒ String?
readonly
Post text.
-
#raw ⇒ Hash
readonly
Full parsed API response.
-
#repost ⇒ Hash?
readonly
Repost details.
-
#user_id ⇒ String?
readonly
Author user ID.
-
#videos ⇒ Array<String>?
readonly
Video URLs.
Class Method Summary collapse
-
.from_api(hash) ⇒ BrightData::LinkedIn::Types::Post
Build a post from a symbol-keyed API response.
Instance Attribute Details
#comments_count ⇒ Integer, ... (readonly)
Returns comment 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_posted ⇒ String? (readonly)
Returns 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 |
#embedded_links ⇒ Array<String>? (readonly)
Returns 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 |
#hashtags ⇒ Array<String>? (readonly)
Returns 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 |
#headline ⇒ String? (readonly)
Returns author 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 |
#id ⇒ String? (readonly)
Returns post 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 |
#images ⇒ Array<String>? (readonly)
Returns image URLs.
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 |
#likes ⇒ Integer, ... (readonly)
Returns like 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 |
#original_post ⇒ Hash? (readonly)
Returns original post details.
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_text ⇒ String? (readonly)
Returns 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 |
#raw ⇒ Hash (readonly)
Returns full parsed API response.
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 |
#repost ⇒ Hash? (readonly)
Returns repost details.
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_id ⇒ String? (readonly)
Returns author 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 |
#videos ⇒ Array<String>? (readonly)
Returns video URLs.
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.
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 |