Class: RestfulPress::Endpoint

Inherits:
Object
  • Object
show all
Defined in:
lib/restful_press/endpoint.rb

Class Method Summary collapse

Class Method Details

.download_job(id) ⇒ Object



15
16
17
# File 'lib/restful_press/endpoint.rb', line 15

def download_job(id)
  endpoint_url ["jobs", id, "download"].join('/')
end

.endpoint_url(path) ⇒ Object



19
20
21
# File 'lib/restful_press/endpoint.rb', line 19

def endpoint_url(path)
  [REALM, path].join('/')
end

.job(id) ⇒ Object



7
8
9
# File 'lib/restful_press/endpoint.rb', line 7

def job(id)
  endpoint_url ["jobs", "#{id}.json"].join('/')
end

.jobsObject



11
12
13
# File 'lib/restful_press/endpoint.rb', line 11

def jobs
  endpoint_url "jobs.json"
end