Module: Parse::API::Server
- Included in:
- Client
- Defined in:
- lib/parse/api/server.rb
Overview
APIs related to the open source Parse Server.
Instance Attribute Summary collapse
-
#server_info ⇒ Hash
Fetch and cache information about the Parse server configuration.
Instance Method Summary collapse
-
#server_health ⇒ Boolean
Fetches the status of the server based on the health check.
-
#server_info! ⇒ Hash
Force fetches the server information.
-
#server_version ⇒ String
Returns the version of the Parse server the client is connected to.
Instance Attribute Details
#server_info ⇒ Hash
Fetch and cache information about the Parse server configuration. This hash contains information specifically to the configuration of the running parse server.
12 13 14 |
# File 'lib/parse/api/server.rb', line 12 def server_info @server_info end |
Instance Method Details
#server_health ⇒ Boolean
Fetches the status of the server based on the health check.
31 32 33 34 35 |
# File 'lib/parse/api/server.rb', line 31 def server_health opts = {cache: false} response = request :get, SERVER_HEALTH_PATH, opts: opts response.success? end |
#server_info! ⇒ Hash
Force fetches the server information.
39 40 41 42 |
# File 'lib/parse/api/server.rb', line 39 def server_info! @server_info = nil server_info end |
#server_version ⇒ String
Returns the version of the Parse server the client is connected to.
46 47 48 |
# File 'lib/parse/api/server.rb', line 46 def server_version server_info.present? ? @server_info[:parseServerVersion] : nil end |