Module: KloutAPI
- Defined in:
- lib/klout/user.rb,
lib/klout_stable.rb,
lib/klout/version.rb,
lib/klout/identity.rb
Defined Under Namespace
Classes: BadRequest, ClientError, Identity, KloutAPI, KloutAPIError, NotFound, ServerError, Unauthorized, Unavailable, User
Constant Summary collapse
- VERSION =
"3.0.1"
Class Method Summary collapse
-
.api_key=(api_key) ⇒ Object
Allow Klout.api_key = “…”.
- .base_uri=(uri) ⇒ Object
-
.disable ⇒ Object
Allows the initializer to turn off actually communicating to the REST service for certain environments Requires fakeweb gem to be installed.
Class Method Details
.api_key=(api_key) ⇒ Object
Allow Klout.api_key = “…”
17 18 19 |
# File 'lib/klout_stable.rb', line 17 def api_key=(api_key) KloutAPI.api_key = api_key end |
.base_uri=(uri) ⇒ Object
21 22 23 |
# File 'lib/klout_stable.rb', line 21 def base_uri=(uri) KloutAPI.base_uri uri end |
.disable ⇒ Object
Allows the initializer to turn off actually communicating to the REST service for certain environments Requires fakeweb gem to be installed
27 28 29 |
# File 'lib/klout_stable.rb', line 27 def disable FakeWeb.register_uri(:any, %r|#{Regexp.escape(KloutAPI.base_uri)}|, :body => '{"Disabled":true}', :content_type => 'application/json; charset=utf-8') end |