Class: Avmtrf1::RestProvider::Instance

Inherits:
Object
  • Object
show all
Defined in:
lib/avmtrf1/rest_provider/instance.rb,
lib/avmtrf1/rest_provider/instance/issues.rb

Overview

Abstract methods

* parse_issue_id(global_issue_id)
* self.build_service_url(service_url_suffix)
* self.issue_get_url_suffix(provider_issue_id)

Defined Under Namespace

Modules: Issues

Instance Method Summary collapse

Instance Method Details

#request(service_url_suffix, headers = {}, &body_data_proc) ⇒ Object


17
18
19
20
21
22
23
# File 'lib/avmtrf1/rest_provider/instance.rb', line 17

def request(service_url_suffix, headers = {}, &body_data_proc)
  r = Avmtrf1::RestProvider::Request.new(build_service_url(service_url_suffix),
                                         body_data_proc)
  headers.each { |name, value| r.header(name, value) }
  r.autenticate(username, password)
  r
end

#request_json(service_url_suffix, headers = {}, &body_data_proc) ⇒ Object


25
26
27
# File 'lib/avmtrf1/rest_provider/instance.rb', line 25

def request_json(service_url_suffix, headers = {}, &body_data_proc)
  request(service_url_suffix, headers.merge('Accept' => 'application/json'), &body_data_proc)
end