Class: BrightData::LinkedIn::Types::Profile

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

Overview

Note:

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

Typed representation of a LinkedIn profile response.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#aboutObject (readonly)

Returns the value of attribute about

Returns:

  • (Object)

    the current value of 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

#avatarObject (readonly)

Returns the value of attribute avatar

Returns:

  • (Object)

    the current value of 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

Returns the value of attribute banner_image

Returns:

  • (Object)

    the current value of 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

#cityObject (readonly)

Returns the value of attribute city

Returns:

  • (Object)

    the current value of 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

#connectionsObject (readonly)

Returns the value of attribute connections

Returns:

  • (Object)

    the current value of 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_codeObject (readonly)

Returns the value of attribute country_code

Returns:

  • (Object)

    the current value of 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_companyObject (readonly)

Returns the value of attribute current_company

Returns:

  • (Object)

    the current value of 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

#educationObject (readonly)

Returns the value of attribute education

Returns:

  • (Object)

    the current value of 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

#experienceObject (readonly)

Returns the value of attribute experience

Returns:

  • (Object)

    the current value of 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

#followersObject (readonly)

Returns the value of attribute followers

Returns:

  • (Object)

    the current value of 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

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of 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_urlObject (readonly)

Returns the value of attribute input_url

Returns:

  • (Object)

    the current value of 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_idObject (readonly)

Returns the value of attribute linkedin_id

Returns:

  • (Object)

    the current value of 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_idObject (readonly)

Returns the value of attribute linkedin_num_id

Returns:

  • (Object)

    the current value of 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

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of 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_viewedObject (readonly)

Returns the value of attribute people_also_viewed

Returns:

  • (Object)

    the current value of 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

#positionObject (readonly)

Returns the value of attribute position

Returns:

  • (Object)

    the current value of 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

#rawObject (readonly)

Returns the value of attribute raw

Returns:

  • (Object)

    the current value of 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.

Parameters:

  • hash (Hash)

    symbolized-key API response object

Returns:



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