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 ⇒ String?
readonly
About text.
-
#avatar ⇒ String?
readonly
Avatar URL.
-
#banner_image ⇒ String?
readonly
Banner image URL.
-
#city ⇒ String?
readonly
Profile city.
-
#connections ⇒ Integer, ...
readonly
Connection count.
-
#country_code ⇒ String?
readonly
Profile country code.
-
#current_company ⇒ Hash?
readonly
Current company details.
-
#education ⇒ Array<Hash>?
readonly
Education entries.
-
#experience ⇒ Array<Hash>?
readonly
Experience entries.
-
#followers ⇒ Integer, ...
readonly
Follower count.
-
#id ⇒ String?
readonly
Profile ID.
-
#input_url ⇒ String?
readonly
Requested input URL.
-
#linkedin_id ⇒ String?
readonly
LinkedIn vanity ID.
-
#linkedin_num_id ⇒ String, ...
readonly
LinkedIn numeric ID.
-
#name ⇒ String?
readonly
Profile name.
-
#people_also_viewed ⇒ Array<Hash>?
readonly
Related profiles.
-
#position ⇒ String?
readonly
Current position.
-
#raw ⇒ Hash
readonly
Full parsed API response.
Class Method Summary collapse
-
.from_api(hash) ⇒ BrightData::LinkedIn::Types::Profile
Build a profile from a symbol-keyed API response.
Instance Attribute Details
#about ⇒ String? (readonly)
Returns about text.
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 ⇒ String? (readonly)
Returns avatar 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 |
#banner_image ⇒ String? (readonly)
Returns banner image 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 |
#city ⇒ String? (readonly)
Returns profile 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 ⇒ Integer, ... (readonly)
Returns connection count.
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 ⇒ String? (readonly)
Returns profile 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 ⇒ Hash? (readonly)
Returns current company details.
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 ⇒ Array<Hash>? (readonly)
Returns education entries.
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 ⇒ Array<Hash>? (readonly)
Returns experience entries.
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 ⇒ Integer, ... (readonly)
Returns follower count.
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 ⇒ String? (readonly)
Returns profile 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 ⇒ String? (readonly)
Returns requested 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 ⇒ String? (readonly)
Returns LinkedIn vanity 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 ⇒ String, ... (readonly)
Returns LinkedIn numeric 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 ⇒ String? (readonly)
Returns profile 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 ⇒ Array<Hash>? (readonly)
Returns related profiles.
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 ⇒ String? (readonly)
Returns current 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 ⇒ Hash (readonly)
Returns full parsed API response.
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 |