Module: Parse::API::Config
- Included in:
- Client
- Defined in:
- lib/parse/api/config.rb
Overview
Defines the Config interface for the Parse REST API
Instance Attribute Summary collapse
- #config ⇒ Hash
Return the configuration hash for the configured application for this client.
Instance Method Summary collapse
- #config! ⇒ Hash
Force fetch the application configuration hash.
- #update_config(params) ⇒ Boolean
Update the application configuration.
Instance Attribute Details
#config ⇒ Hash
Return the configuration hash for the configured application for this client. This method caches the configuration after the first time it is fetched.
11 12 13 | # File 'lib/parse/api/config.rb', line 11 def config @config end |
Instance Method Details
#config! ⇒ Hash
Returns force fetch the application configuration hash.
17 18 19 20 | # File 'lib/parse/api/config.rb', line 17 def config! @config = nil self.config end |
#update_config(params) ⇒ Boolean
Update the application configuration
38 39 40 41 42 43 44 45 | # File 'lib/parse/api/config.rb', line 38 def update_config(params) body = { params: params } response = request :put, CONFIG_PATH, body: body return false if response.error? result = response.result["result"] @config.merge!(params) if result && @config.present? result end |