module FbGraph2
Constants
- DEFAULT_API_VERSION
- DEFAULT_ROOT_URL
Public Class Methods
api_version()
click to toggle source
# File lib/fb_graph2.rb, line 26 def api_version ::Thread.current['fb_graph2_api_version'] || DEFAULT_API_VERSION end
api_version=(value)
click to toggle source
# File lib/fb_graph2.rb, line 30 def api_version=(value) ::Thread.current['fb_graph2_api_version'] = value end
debug!()
click to toggle source
# File lib/fb_graph2.rb, line 41 def debug! Rack::OAuth2.debug! self.debugging = true end
debugging?()
click to toggle source
# File lib/fb_graph2.rb, line 38 def debugging? !!self.debugging end
http_client(access_token = nil)
click to toggle source
# File lib/fb_graph2.rb, line 46 def http_client(access_token = nil) _http_client_ = HTTPClient.new( agent_name: "FbGraph2 (#{gem_version})" ) # NOTE: httpclient gem seems stopped maintaining root certtificate set, use OS default. _http_client_.ssl_config.clear_cert_store _http_client_.ssl_config.cert_store.set_default_paths _http_client_.request_filter.delete_if do |filter| filter.is_a? HTTPClient::WWWAuth end _http_client_.request_filter << RequestFilter::Authenticator.new(access_token) if access_token.present? _http_client_.request_filter << RequestFilter::Debugger.new if self.debugging? _http_config_.try(:call, _http_client_) _http_client_ end
http_config(&block)
click to toggle source
# File lib/fb_graph2.rb, line 63 def http_config(&block) Rack::OAuth2.http_config &block unless Rack::OAuth2.http_config self._http_config_ ||= block end
object_classes()
click to toggle source
# File lib/fb_graph2.rb, line 34 def object_classes FbGraph2::Node.descendants end
root_url()
click to toggle source
# File lib/fb_graph2.rb, line 18 def root_url ::Thread.current['fb_graph2_root_url'] || DEFAULT_ROOT_URL end
root_url=(value)
click to toggle source
# File lib/fb_graph2.rb, line 22 def root_url=(value) ::Thread.current['fb_graph2_root_url'] = value end