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/http_service.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/request.rb,
lib/koala/api/graph_api_methods.rb,
lib/koala/http_service/response.rb,
lib/koala/api/graph_error_checker.rb,
lib/koala/http_service/uploadable_io.rb

Defined Under Namespace

Modules: Facebook, HTTPService, Utils Classes: Configuration, KoalaError

Constant Summary collapse

VERSION =
"3.6.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.http_serviceObject

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.



34
35
36
# File 'lib/koala.rb', line 34

def http_service
  @http_service
end

Class Method Details

.configObject

Allows you to control various Koala configuration options. NOTE: this is not currently threadsafe. See Koala::Configuration.



43
44
45
# File 'lib/koala.rb', line 43

def config
  @config ||= Configuration.new
end

.configure {|config| ... } ⇒ Object

Yields:



36
37
38
# File 'lib/koala.rb', line 36

def configure
  yield config
end

.make_request(path, args, verb, options = {}) ⇒ Object

An convenenient alias to Koala.http_service.make_request.



61
62
63
# File 'lib/koala.rb', line 61

def self.make_request(path, args, verb, options = {})
  http_service.make_request(HTTPService::Request.new(path: path, args: args, verb: verb, options: options))
end

.reset_configObject

Used for testing.



48
49
50
# File 'lib/koala.rb', line 48

def reset_config
  @config = nil
end