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

#aboutString? (readonly)

Returns about text.

Returns:

  • (String, nil)

    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

#avatarString? (readonly)

Returns avatar URL.

Returns:

  • (String, nil)

    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

Returns banner image URL.

Returns:

  • (String, nil)

    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

#cityString? (readonly)

Returns profile city.

Returns:

  • (String, nil)

    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

#connectionsInteger, ... (readonly)

Returns connection count.

Returns:

  • (Integer, String, nil)

    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_codeString? (readonly)

Returns profile country code.

Returns:

  • (String, nil)

    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_companyHash? (readonly)

Returns current company details.

Returns:

  • (Hash, nil)

    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

#educationArray<Hash>? (readonly)

Returns education entries.

Returns:

  • (Array<Hash>, nil)

    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

#experienceArray<Hash>? (readonly)

Returns experience entries.

Returns:

  • (Array<Hash>, nil)

    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

#followersInteger, ... (readonly)

Returns follower count.

Returns:

  • (Integer, String, nil)

    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

#idString? (readonly)

Returns profile ID.

Returns:

  • (String, nil)

    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_urlString? (readonly)

Returns requested input URL.

Returns:

  • (String, nil)

    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_idString? (readonly)

Returns LinkedIn vanity ID.

Returns:

  • (String, nil)

    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_idString, ... (readonly)

Returns LinkedIn numeric ID.

Returns:

  • (String, Integer, nil)

    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

#nameString? (readonly)

Returns profile name.

Returns:

  • (String, nil)

    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_viewedArray<Hash>? (readonly)

Returns related profiles.

Returns:

  • (Array<Hash>, nil)

    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

#positionString? (readonly)

Returns current position.

Returns:

  • (String, nil)

    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

#rawHash (readonly)

Returns full parsed API response.

Returns:

  • (Hash)

    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.

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