Class: WpApiClient::Configuration
- Inherits:
-
Object
- Object
- WpApiClient::Configuration
- Defined in:
- lib/wp_api_client/configuration.rb
Instance Attribute Summary collapse
-
#basic_auth ⇒ Object
Returns the value of attribute basic_auth.
-
#cache ⇒ Object
Returns the value of attribute cache.
-
#debug ⇒ Object
Returns the value of attribute debug.
-
#embed ⇒ Object
Returns the value of attribute embed.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#oauth_credentials ⇒ Object
Returns the value of attribute oauth_credentials.
Instance Method Summary collapse
- #define_mapping(relation, type) ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #request_params ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
27 28 29 30 |
# File 'lib/wp_api_client/configuration.rb', line 27 def initialize @endpoint = 'http://localhost:8080/wp-json/wp/v2' = true end |
Instance Attribute Details
#basic_auth ⇒ Object
Returns the value of attribute basic_auth.
25 26 27 |
# File 'lib/wp_api_client/configuration.rb', line 25 def basic_auth @basic_auth end |
#cache ⇒ Object
Returns the value of attribute cache.
24 25 26 |
# File 'lib/wp_api_client/configuration.rb', line 24 def cache @cache end |
#debug ⇒ Object
Returns the value of attribute debug.
23 24 25 |
# File 'lib/wp_api_client/configuration.rb', line 23 def debug @debug end |
#embed ⇒ Object
Returns the value of attribute embed.
21 22 23 |
# File 'lib/wp_api_client/configuration.rb', line 21 def end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
20 21 22 |
# File 'lib/wp_api_client/configuration.rb', line 20 def endpoint @endpoint end |
#oauth_credentials ⇒ Object
Returns the value of attribute oauth_credentials.
22 23 24 |
# File 'lib/wp_api_client/configuration.rb', line 22 def oauth_credentials @oauth_credentials end |
Instance Method Details
#define_mapping(relation, type) ⇒ Object
32 33 34 |
# File 'lib/wp_api_client/configuration.rb', line 32 def define_mapping(relation, type) WpApiClient::Relationship.define(relation, type) end |
#request_params ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/wp_api_client/configuration.rb', line 36 def request_params params = {} if params[:_embed] = true end params end |