Module: Koala
- Defined in:
- lib/koala.rb,
lib/koala/api.rb,
lib/koala/oauth.rb,
lib/koala/utils.rb,
lib/koala/errors.rb,
lib/koala/version.rb,
lib/koala/test_users.rb,
lib/koala/api/rest_api.rb,
lib/koala/http_service.rb,
lib/koala/api/graph_api.rb,
lib/koala/realtime_updates.rb,
lib/koala/api/batch_operation.rb,
lib/koala/api/graph_batch_api.rb,
lib/koala/api/graph_collection.rb,
lib/koala/http_service/response.rb,
lib/koala/http_service/uploadable_io.rb,
lib/koala/http_service/multipart_request.rb
Defined Under Namespace
Modules: Facebook, HTTPService, Utils Classes: KoalaError
Constant Summary collapse
- VERSION =
"2.2.0"
Class Attribute Summary collapse
-
.http_service ⇒ Object
readonly
Control which HTTP service framework Koala uses.
Class Method Summary collapse
-
.config ⇒ Object
Allows you to control various Koala configuration options.
- .configure {|config| ... } ⇒ Object
-
.make_request(path, args, verb, options = {}) ⇒ Object
An convenenient alias to Koala.http_service.make_request.
-
.reset_config ⇒ Object
Used for testing.
Class Attribute Details
.http_service ⇒ Object
Control which HTTP service framework Koala uses. Primarily used to switch between the mock-request framework used in testing and the live framework used in real life (and live testing). In theory, you could write your own HTTPService module if you need different functionality, but since the switch to Faraday almost all such goals can be accomplished with middleware.
32 33 34 |
# File 'lib/koala.rb', line 32 def http_service @http_service end |
Class Method Details
.config ⇒ Object
Allows you to control various Koala configuration options. Notable options:
* server endpoints: you can override any or all the server endpoints
(see HTTPService::DEFAULT_SERVERS) if you want to run requests through
other servers.
* api_version: controls which Facebook API version to use (v1.0, v2.0,
etc)
45 46 47 |
# File 'lib/koala.rb', line 45 def config @config ||= OpenStruct.new(HTTPService::DEFAULT_SERVERS) end |
.configure {|config| ... } ⇒ Object
34 35 36 |
# File 'lib/koala.rb', line 34 def configure yield config end |
.make_request(path, args, verb, options = {}) ⇒ Object
An convenenient alias to Koala.http_service.make_request.
63 64 65 |
# File 'lib/koala.rb', line 63 def self.make_request(path, args, verb, = {}) http_service.make_request(path, args, verb, ) end |
.reset_config ⇒ Object
Used for testing.
50 51 52 |
# File 'lib/koala.rb', line 50 def reset_config @config = nil end |