Class: RubyDesk::Job

Inherits:
OdeskEntity show all
Defined in:
lib/ruby_desk/job.rb

Overview

A job opening with the following attributes

  • amount
  • buyer
  • candidates_total
  • candidates_total_active
  • company_ref
  • date_posted
  • engagement_related
  • engagement_weeks
  • hours_per_week
  • interviewees_total_active
  • job_category_level_one
  • job_category_level_two
  • job_type
  • odr_meta
  • offers_total
  • offers_total_open
  • op_active
  • op_attached_doc
  • op_avg_bid_active
  • op_avg_bid_active_interviewees
  • op_avg_bid_all
  • op_avg_bid_interviewees
  • op_avg_hourly_rate_active
  • op_avg_hourly_rate_active_interviewees
  • op_avg_hourly_rate_all
  • op_avg_hourly_rate_interviewees
  • op_buyer_ace
  • op_cancel_ts
  • op_comm_status
  • op_country
  • op_ctime
  • op_date_created
  • op_desc_digest
  • op_description
  • op_end_date
  • op_eng_type
  • op_engagement
  • op_est_duration
  • op_high_bid_active
  • op_high_bid_active_interviewees
  • op_high_bid_all
  • op_high_bid_interviewees
  • op_high_hourly_rate_active
  • op_high_hourly_rate_active_interviewees
  • op_high_hourly_rate_all
  • op_high_hourly_rate_interviewees
  • op_is_validnonprivate
  • op_is_viewable
  • op_job_category_seo
  • op_job_expiration
  • op_last_buyer_activity
  • op_low_bid_active
  • op_low_bid_active_interviewees
  • op_low_bid_all
  • op_low_hourly_rate_active
  • op_low_hourly_rate_active_interviewees
  • op_low_hourly_rate_all
  • op_low_hourly_rate_interviewees
  • op_lowhigh_bid_interviewees
  • op_num_of_pending_invites
  • op_pref_english_skill
  • op_pref_fb_score
  • op_pref_group_recno
  • op_pref_has_portfolio
  • op_pref_hourly_rate_max
  • op_pref_hourly_rate_min
  • op_pref_hours_per_week
  • op_pref_location
  • op_pref_odesk_hours
  • op_pref_test
  • op_pref_test_name
  • op_private_rating_active
  • op_reason
  • op_recno
  • op_required_skills
  • op_skill
  • op_start_date
  • op_status_for_search
  • op_time_created
  • op_time_posted
  • op_title
  • op_tot_cand_client
  • op_tot_cand_prof
  • op_tot_new_cond
  • op_tot_rej
  • op_ui_profile_access
  • profile_key
  • search_status
  • timezone
  • ui_job_profile_access
  • version

Class Method Summary collapse

Methods inherited from OdeskEntity

attribute, #initialize

Constructor Details

This class inherits a constructor from RubyDesk::OdeskEntity

Class Method Details

.search(connector, query_options = {}) ⇒ Object

Details on Search Parameters

 

  • q - OpeningData (Opening Data)
    • Search the text of the job description
  • c1 - JobCategory (Level One Job Category)
    • Limit your search to a specific category
  • c2 - second_category (Second Level Job Category)
    • Limit your search to a specific sub-category
      • You must use a level one category in order to use a second level category.
  • fb - adjusted_score (Adjusted Score)
    • Limit your search to buyers with at least a score of the number passed in this parameter.
      • This number must be 5 or less
  • min - min_budget (Min Budget)
    • Limit your search to jobs with a budget greater than this number.
  • max - max_budget (Max Budget)
    • Limit your search to jobs with a budget less than this number.
  • t - JobType (Job Type)
    • oDesk has both hourly jobs and fixed prices jobs. This parameter allows you to limit your search to one or the other.
      • Hourly Jobs = 'Hourly'
      • Fixed Priced Jobs = 'Fixed'
    • wl - hours_per_week(Hours per Week)
      • This parameter can only be used when searching Hourly jobs. These numbers are a little arbitrary, so follow the following parameters in order to successfully use this parameter:
        • As Needed < 10 Hours/Week = '0'

        • Part Time: 10-30 hrs/week = '20'

        • Full Time: 30+ hrs/week = '40'
    • dur - engagement_duration (Engagement Duration)
      • This parameter can only be used when searching Hourly jobs. These numbers are a little arbitrary, so follow the following parameters in order to successfully use this parameter:
        • Ongoing / More than 6 months = '1'
        • 3 to 6 months = '2'
        • 1 to 3 months = '3'
        • Less than 1 month = '4'
        • Less than 1 week = '5'
  • dp - Date_Posted (Date Posted)
    • Search jobs posted after this date.
      • Format for date: 07-22-2009
  • st - status_for_search (Status for Search)
    • Search Canceled jobs, In Progress Jobs and Completed Jobs: By default this default to Open Jobs
      • Open Jobs = 'Open'
      • Jobs in Progress = 'In Progress'
      • Completed Jobs = 'Completed'
      • Canceled Jobs = 'Cancelled'
  • tba - total_billed_assignments (Total Billed Assignments)
    • Limit your search to buyers who completed at least this number of paid assignments
      • For example tb=5 searches buyers who have at least 5 billed assignments
  • gr - PrefGroup(Preferred Group)providers
    • Limits your search to buyers in a particular group
  • to - titles_only (titles only)
    • Limits your search to job titles only. (you should be able to combine this search)


255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/ruby_desk/job.rb', line 255

def self.search(connector, query_options={})
  if query_options.respond_to? :to_str
    return search(connector, :q=>query_options.to_str)
  end
  json = connector.prepare_and_invoke_api_call(
      'profiles/v1/search/jobs', :method=>:get,
      :auth=>false, :sign=>false, :params=>query_options)
  jobs = []
  if json['jobs']['job']
    [json['jobs']['job']].flatten.each do |job|
      jobs << self.new(job)
    end
  end
  return jobs
end