Class: MethodRuby::Resources::Ping
- Inherits:
-
Object
- Object
- MethodRuby::Resources::Ping
- Defined in:
- lib/method_ruby/resources/ping.rb
Overview
Health check endpoint
Instance Method Summary collapse
-
#check(method_version:, request_options: {}) ⇒ MethodRuby::Models::PingCheckResponse
Some parameter documentations has been truncated, see Models::PingCheckParams for more details.
-
#initialize(client:) ⇒ Ping
constructor
private
A new instance of Ping.
Constructor Details
#initialize(client:) ⇒ Ping
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Ping.
36 37 38 |
# File 'lib/method_ruby/resources/ping.rb', line 36 def initialize(client:) @client = client end |
Instance Method Details
#check(method_version:, request_options: {}) ⇒ MethodRuby::Models::PingCheckResponse
Some parameter documentations has been truncated, see Models::PingCheckParams for more details.
Returns a simple health check response for authenticated API clients.
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/method_ruby/resources/ping.rb', line 21 def check(params) parsed, = MethodRuby::PingCheckParams.dump_request(params) @client.request( method: :get, path: "ping", headers: parsed.transform_keys(method_version: "method-version"), model: MethodRuby::Models::PingCheckResponse, security: {secret_key: true}, options: ) end |