Class: BrightData::LinkedIn::Types::Job

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

Overview

Note:

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

Typed representation of a LinkedIn job response.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#company_logoString? (readonly)

Returns company logo URL.

Returns:

  • (String, nil)

    company logo URL



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/brightdata/linkedin/types/job.rb', line 29

Job = Data.define(
  :url, :job_posting_id, :job_title, :company_name, :job_location,
  :job_summary, :job_base_pay_range, :job_posted_time, :company_logo, :raw
) do
  # Build a job from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Job]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      url: hash[:url],
      job_posting_id: hash[:job_posting_id],
      job_title: hash[:job_title],
      company_name: hash[:company_name],
      job_location: hash[:job_location],
      job_summary: hash[:job_summary],
      job_base_pay_range: hash[:job_base_pay_range],
      job_posted_time: hash[:job_posted_time],
      company_logo: hash[:company_logo],
      raw: hash
    )
  end
end

#company_nameString? (readonly)

Returns company name.

Returns:

  • (String, nil)

    company name



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/brightdata/linkedin/types/job.rb', line 29

Job = Data.define(
  :url, :job_posting_id, :job_title, :company_name, :job_location,
  :job_summary, :job_base_pay_range, :job_posted_time, :company_logo, :raw
) do
  # Build a job from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Job]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      url: hash[:url],
      job_posting_id: hash[:job_posting_id],
      job_title: hash[:job_title],
      company_name: hash[:company_name],
      job_location: hash[:job_location],
      job_summary: hash[:job_summary],
      job_base_pay_range: hash[:job_base_pay_range],
      job_posted_time: hash[:job_posted_time],
      company_logo: hash[:company_logo],
      raw: hash
    )
  end
end

#job_base_pay_rangeString? (readonly)

Returns base pay range.

Returns:

  • (String, nil)

    base pay range



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/brightdata/linkedin/types/job.rb', line 29

Job = Data.define(
  :url, :job_posting_id, :job_title, :company_name, :job_location,
  :job_summary, :job_base_pay_range, :job_posted_time, :company_logo, :raw
) do
  # Build a job from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Job]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      url: hash[:url],
      job_posting_id: hash[:job_posting_id],
      job_title: hash[:job_title],
      company_name: hash[:company_name],
      job_location: hash[:job_location],
      job_summary: hash[:job_summary],
      job_base_pay_range: hash[:job_base_pay_range],
      job_posted_time: hash[:job_posted_time],
      company_logo: hash[:company_logo],
      raw: hash
    )
  end
end

#job_locationString? (readonly)

Returns job location.

Returns:

  • (String, nil)

    job location



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/brightdata/linkedin/types/job.rb', line 29

Job = Data.define(
  :url, :job_posting_id, :job_title, :company_name, :job_location,
  :job_summary, :job_base_pay_range, :job_posted_time, :company_logo, :raw
) do
  # Build a job from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Job]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      url: hash[:url],
      job_posting_id: hash[:job_posting_id],
      job_title: hash[:job_title],
      company_name: hash[:company_name],
      job_location: hash[:job_location],
      job_summary: hash[:job_summary],
      job_base_pay_range: hash[:job_base_pay_range],
      job_posted_time: hash[:job_posted_time],
      company_logo: hash[:company_logo],
      raw: hash
    )
  end
end

#job_posted_timeString? (readonly)

Returns posted time.

Returns:

  • (String, nil)

    posted time



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/brightdata/linkedin/types/job.rb', line 29

Job = Data.define(
  :url, :job_posting_id, :job_title, :company_name, :job_location,
  :job_summary, :job_base_pay_range, :job_posted_time, :company_logo, :raw
) do
  # Build a job from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Job]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      url: hash[:url],
      job_posting_id: hash[:job_posting_id],
      job_title: hash[:job_title],
      company_name: hash[:company_name],
      job_location: hash[:job_location],
      job_summary: hash[:job_summary],
      job_base_pay_range: hash[:job_base_pay_range],
      job_posted_time: hash[:job_posted_time],
      company_logo: hash[:company_logo],
      raw: hash
    )
  end
end

#job_posting_idString? (readonly)

Returns job posting ID.

Returns:

  • (String, nil)

    job posting ID



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/brightdata/linkedin/types/job.rb', line 29

Job = Data.define(
  :url, :job_posting_id, :job_title, :company_name, :job_location,
  :job_summary, :job_base_pay_range, :job_posted_time, :company_logo, :raw
) do
  # Build a job from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Job]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      url: hash[:url],
      job_posting_id: hash[:job_posting_id],
      job_title: hash[:job_title],
      company_name: hash[:company_name],
      job_location: hash[:job_location],
      job_summary: hash[:job_summary],
      job_base_pay_range: hash[:job_base_pay_range],
      job_posted_time: hash[:job_posted_time],
      company_logo: hash[:company_logo],
      raw: hash
    )
  end
end

#job_summaryString? (readonly)

Returns job summary.

Returns:

  • (String, nil)

    job summary



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/brightdata/linkedin/types/job.rb', line 29

Job = Data.define(
  :url, :job_posting_id, :job_title, :company_name, :job_location,
  :job_summary, :job_base_pay_range, :job_posted_time, :company_logo, :raw
) do
  # Build a job from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Job]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      url: hash[:url],
      job_posting_id: hash[:job_posting_id],
      job_title: hash[:job_title],
      company_name: hash[:company_name],
      job_location: hash[:job_location],
      job_summary: hash[:job_summary],
      job_base_pay_range: hash[:job_base_pay_range],
      job_posted_time: hash[:job_posted_time],
      company_logo: hash[:company_logo],
      raw: hash
    )
  end
end

#job_titleString? (readonly)

Returns job title.

Returns:

  • (String, nil)

    job title



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/brightdata/linkedin/types/job.rb', line 29

Job = Data.define(
  :url, :job_posting_id, :job_title, :company_name, :job_location,
  :job_summary, :job_base_pay_range, :job_posted_time, :company_logo, :raw
) do
  # Build a job from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Job]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      url: hash[:url],
      job_posting_id: hash[:job_posting_id],
      job_title: hash[:job_title],
      company_name: hash[:company_name],
      job_location: hash[:job_location],
      job_summary: hash[:job_summary],
      job_base_pay_range: hash[:job_base_pay_range],
      job_posted_time: hash[:job_posted_time],
      company_logo: hash[:company_logo],
      raw: hash
    )
  end
end

#rawHash (readonly)

Returns full parsed API response.

Returns:

  • (Hash)

    full parsed API response



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/brightdata/linkedin/types/job.rb', line 29

Job = Data.define(
  :url, :job_posting_id, :job_title, :company_name, :job_location,
  :job_summary, :job_base_pay_range, :job_posted_time, :company_logo, :raw
) do
  # Build a job from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Job]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      url: hash[:url],
      job_posting_id: hash[:job_posting_id],
      job_title: hash[:job_title],
      company_name: hash[:company_name],
      job_location: hash[:job_location],
      job_summary: hash[:job_summary],
      job_base_pay_range: hash[:job_base_pay_range],
      job_posted_time: hash[:job_posted_time],
      company_logo: hash[:company_logo],
      raw: hash
    )
  end
end

#urlString? (readonly)

Returns job URL.

Returns:

  • (String, nil)

    job URL



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/brightdata/linkedin/types/job.rb', line 29

Job = Data.define(
  :url, :job_posting_id, :job_title, :company_name, :job_location,
  :job_summary, :job_base_pay_range, :job_posted_time, :company_logo, :raw
) do
  # Build a job from a symbol-keyed API response.
  #
  # @param hash [Hash] symbolized-key API response object
  # @return [BrightData::LinkedIn::Types::Job]
  def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
    new(
      url: hash[:url],
      job_posting_id: hash[:job_posting_id],
      job_title: hash[:job_title],
      company_name: hash[:company_name],
      job_location: hash[:job_location],
      job_summary: hash[:job_summary],
      job_base_pay_range: hash[:job_base_pay_range],
      job_posted_time: hash[:job_posted_time],
      company_logo: hash[:company_logo],
      raw: hash
    )
  end
end

Class Method Details

.from_api(hash) ⇒ BrightData::LinkedIn::Types::Job

Build a job from a symbol-keyed API response.

Parameters:

  • hash (Hash)

    symbolized-key API response object

Returns:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/brightdata/linkedin/types/job.rb', line 37

def self.from_api(hash) # rubocop:disable Metrics/MethodLength -- flat field-by-field mapping from the API response
  new(
    url: hash[:url],
    job_posting_id: hash[:job_posting_id],
    job_title: hash[:job_title],
    company_name: hash[:company_name],
    job_location: hash[:job_location],
    job_summary: hash[:job_summary],
    job_base_pay_range: hash[:job_base_pay_range],
    job_posted_time: hash[:job_posted_time],
    company_logo: hash[:company_logo],
    raw: hash
  )
end