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.
11 12 13 | # File 'lib/parse/api/server.rb', line 11 def server_info @server_info end |
Instance Method Details
#server_health ⇒ Boolean
Fetches the status of the server based on the health check.
30 31 32 33 34 | # File 'lib/parse/api/server.rb', line 30 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.
38 39 40 41 | # File 'lib/parse/api/server.rb', line 38 def server_info! @server_info = nil server_info end |
#server_version ⇒ String
Returns the version of the Parse server the client is connected to.
45 46 47 | # File 'lib/parse/api/server.rb', line 45 def server_version server_info.present? ? @server_info[:parseServerVersion] : nil end |