Class: Upwork::Api::Routers::Hr::Jobs
- Inherits:
-
Object
- Object
- Upwork::Api::Routers::Hr::Jobs
- Defined in:
- lib/upwork/api/routers/hr/jobs.rb
Overview
Jobs API
Constant Summary collapse
- ENTRY_POINT =
'api'
Instance Method Summary collapse
-
#delete_job(key, params) ⇒ Object
Delete existent job.
-
#edit_job(key, params) ⇒ Object
Edit existent job.
-
#get_list(params) ⇒ Object
Get list of jobs .
-
#get_specific(key) ⇒ Object
Get specific job by key.
-
#initialize(client) ⇒ Jobs
constructor
Init.
-
#post_job(params) ⇒ Object
Post a new job.
Constructor Details
#initialize(client) ⇒ Jobs
Init
Arguments:
client: (Client)
26 27 28 29 |
# File 'lib/upwork/api/routers/hr/jobs.rb', line 26 def initialize(client) @client = client @client.epoint = ENTRY_POINT end |
Instance Method Details
#delete_job(key, params) ⇒ Object
Delete existent job
Arguments:
params: (Hash)
71 72 73 74 |
# File 'lib/upwork/api/routers/hr/jobs.rb', line 71 def delete_job(key, params) $LOG.i "running " + __method__.to_s @client.delete '/hr/v2/jobs/' + key, params end |
#edit_job(key, params) ⇒ Object
Edit existent job
Arguments:
params: (Hash)
62 63 64 65 |
# File 'lib/upwork/api/routers/hr/jobs.rb', line 62 def edit_job(key, params) $LOG.i "running " + __method__.to_s @client.put '/hr/v2/jobs/' + key, params end |
#get_list(params) ⇒ Object
Get list of jobs
Arguments:
params: (Hash)
35 36 37 38 |
# File 'lib/upwork/api/routers/hr/jobs.rb', line 35 def get_list(params) $LOG.i "running " + __method__.to_s @client.get '/hr/v2/jobs', params end |
#get_specific(key) ⇒ Object
Get specific job by key
Arguments:
key: (String)
44 45 46 47 |
# File 'lib/upwork/api/routers/hr/jobs.rb', line 44 def get_specific(key) $LOG.i "running " + __method__.to_s @client.get '/hr/v2/jobs/' + key end |
#post_job(params) ⇒ Object
Post a new job
Arguments:
params: (Hash)
53 54 55 56 |
# File 'lib/upwork/api/routers/hr/jobs.rb', line 53 def post_job(params) $LOG.i "running " + __method__.to_s @client.post '/hr/v2/jobs', params end |