Module: WordpressApi

Defined in:
lib/wordpress_api.rb,
lib/wordpress_api/api.rb,
lib/wordpress_api/mash.rb,
lib/wordpress_api/client.rb,
lib/wordpress_api/errors.rb,
lib/wordpress_api/helpers.rb,
lib/wordpress_api/version.rb,
lib/wordpress_api/api/reader.rb,
lib/wordpress_api/api/writer.rb,
lib/wordpress_api/helpers/request.rb,
lib/wordpress_api/helpers/authorization.rb

Defined Under Namespace

Modules: Api, Errors, Helpers, VERSION Classes: Client, Mash

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.secretObject

Returns the value of attribute secret.



6
7
8
# File 'lib/wordpress_api.rb', line 6

def secret
  @secret
end

.tokenObject

Returns the value of attribute token.



6
7
8
# File 'lib/wordpress_api.rb', line 6

def token
  @token
end

Class Method Details

.configure {|_self| ... } ⇒ Object

config/initializers/wordpress_api.rb (for instance)

WordpressApi.configure do |config|

config.token = 'consumer_token'
config.secret = 'consumer_secret'
config.default_profile_fields = ['education', 'positions']

end

elsewhere

client = WordpressApi::Client.new

Yields:

  • (_self)

Yield Parameters:

  • _self (WordpressApi)

    the object that the method was called on



19
20
21
22
# File 'lib/wordpress_api.rb', line 19

def configure
  yield self
  true
end