Class: BrightData::LinkedIn::Types::Profile
- Inherits:
-
Data
- Object
- Data
- BrightData::LinkedIn::Types::Profile
- Defined in:
- lib/brightdata/linkedin/types/profile.rb
Overview
Use #raw to access fields not yet typed by this gem.
Typed representation of a LinkedIn profile response.
Instance Attribute Summary collapse
-
#about ⇒ Object
readonly
Returns the value of attribute about.
-
#avatar ⇒ Object
readonly
Returns the value of attribute avatar.
-
#banner_image ⇒ Object
readonly
Returns the value of attribute banner_image.
-
#city ⇒ Object
readonly
Returns the value of attribute city.
-
#connections ⇒ Object
readonly
Returns the value of attribute connections.
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
-
#current_company ⇒ Object
readonly
Returns the value of attribute current_company.
-
#education ⇒ Object
readonly
Returns the value of attribute education.
-
#experience ⇒ Object
readonly
Returns the value of attribute experience.
-
#followers ⇒ Object
readonly
Returns the value of attribute followers.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#input_url ⇒ Object
readonly
Returns the value of attribute input_url.
-
#linkedin_id ⇒ Object
readonly
Returns the value of attribute linkedin_id.
-
#linkedin_num_id ⇒ Object
readonly
Returns the value of attribute linkedin_num_id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#people_also_viewed ⇒ Object
readonly
Returns the value of attribute people_also_viewed.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Class Method Summary collapse
-
.from_api(hash) ⇒ BrightData::LinkedIn::Types::Profile
Build a profile from a symbol-keyed API response.
Instance Attribute Details
#about ⇒ Object (readonly)
Returns the value of attribute about
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#avatar ⇒ Object (readonly)
Returns the value of attribute avatar
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#banner_image ⇒ Object (readonly)
Returns the value of attribute banner_image
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#city ⇒ Object (readonly)
Returns the value of attribute city
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#connections ⇒ Object (readonly)
Returns the value of attribute connections
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#current_company ⇒ Object (readonly)
Returns the value of attribute current_company
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#education ⇒ Object (readonly)
Returns the value of attribute education
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#experience ⇒ Object (readonly)
Returns the value of attribute experience
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#followers ⇒ Object (readonly)
Returns the value of attribute followers
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#id ⇒ Object (readonly)
Returns the value of attribute id
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#input_url ⇒ Object (readonly)
Returns the value of attribute input_url
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#linkedin_id ⇒ Object (readonly)
Returns the value of attribute linkedin_id
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#linkedin_num_id ⇒ Object (readonly)
Returns the value of attribute linkedin_num_id
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#name ⇒ Object (readonly)
Returns the value of attribute name
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#people_also_viewed ⇒ Object (readonly)
Returns the value of attribute people_also_viewed
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#position ⇒ Object (readonly)
Returns the value of attribute position
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 46 Profile = Data.define( :id, :name, :city, :country_code, :position, :about, :current_company, :experience, :education, :connections, :followers, :linkedin_id, :linkedin_num_id, :avatar, :banner_image, :people_also_viewed, :input_url, :raw ) do # Build a profile from a symbol-keyed API response. # # @param hash [Hash] symbolized-key API response object # @return [BrightData::LinkedIn::Types::Profile] def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end end |
Class Method Details
.from_api(hash) ⇒ BrightData::LinkedIn::Types::Profile
Build a profile from a symbol-keyed API response.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/brightdata/linkedin/types/profile.rb', line 56 def self.from_api(hash) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength -- flat field-by-field mapping from the API response new( id: hash[:id], name: hash[:name], city: hash[:city], country_code: hash[:country_code], position: hash[:position], about: hash[:about], current_company: hash[:current_company], experience: hash[:experience], education: hash[:education], connections: hash[:connections], followers: hash[:followers], linkedin_id: hash[:linkedin_id], linkedin_num_id: hash[:linkedin_num_id], avatar: hash[:avatar], banner_image: hash[:banner_image], people_also_viewed: hash[:people_also_viewed], input_url: hash[:input_url], raw: hash ) end |