Class: MojFileUploaderApiClient::Status

Inherits:
HttpClient
  • Object
show all
Defined in:
lib/mojfile_uploader_api_client/status.rb

Constant Summary

Constants inherited from HttpClient

HttpClient::DEFAULT_OPTIONS

Instance Attribute Summary

Attributes inherited from HttpClient

#response

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from HttpClient

#call, configure, #options, #payload, #payload?

Class Method Details

.optionsObject



3
4
5
6
7
# File 'lib/mojfile_uploader_api_client/status.rb', line 3

def self.options
  # Setting `timeout` will override both `read_timeout` and `open_timeout`
  # in the RestClient.
  { timeout: 5 }
end

Instance Method Details

#available?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/mojfile_uploader_api_client/status.rb', line 17

def available?
  response.success? && status.eql?('ok')
end

#endpointObject



13
14
15
# File 'lib/mojfile_uploader_api_client/status.rb', line 13

def endpoint
  'status'
end

#verbObject



9
10
11
# File 'lib/mojfile_uploader_api_client/status.rb', line 9

def verb
  :get
end