Class: PipelineService::HTTPClient

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
app/services/pipeline_service/http_client.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.get(endpoint, args = {}) ⇒ Object



9
10
11
# File 'app/services/pipeline_service/http_client.rb', line 9

def self.get(endpoint, args={})
  instance.get(endpoint, args)
end

.post(args) ⇒ Object



5
6
7
# File 'app/services/pipeline_service/http_client.rb', line 5

def self.post(args)
  instance.post(args)
end

Instance Method Details

#get(endpoint, args) ⇒ Object



18
19
20
# File 'app/services/pipeline_service/http_client.rb', line 18

def get(endpoint, args)
  HTTParty.get(endpoint, args)
end

#post(args) ⇒ Object



13
14
15
16
# File 'app/services/pipeline_service/http_client.rb', line 13

def post(args)
  message = PipelinePublisher::Message.new(args)
  PipelinePublisher::MessagesApi.new.messages_post(message)
end