Module: FbGraph2
- Defined in:
- lib/fb_graph2.rb,
lib/fb_graph2/edge.rb,
lib/fb_graph2/node.rb,
lib/fb_graph2/page.rb,
lib/fb_graph2/post.rb,
lib/fb_graph2/user.rb,
lib/fb_graph2/album.rb,
lib/fb_graph2/event.rb,
lib/fb_graph2/group.rb,
lib/fb_graph2/edge/feed.rb,
lib/fb_graph2/edge/home.rb,
lib/fb_graph2/collection.rb,
lib/fb_graph2/edge/books.rb,
lib/fb_graph2/edge/games.rb,
lib/fb_graph2/edge/likes.rb,
lib/fb_graph2/edge/links.rb,
lib/fb_graph2/edge/music.rb,
lib/fb_graph2/edge/posts.rb,
lib/fb_graph2/achievement.rb,
lib/fb_graph2/application.rb,
lib/fb_graph2/edge/albums.rb,
lib/fb_graph2/edge/events.rb,
lib/fb_graph2/edge/family.rb,
lib/fb_graph2/edge/groups.rb,
lib/fb_graph2/edge/movies.rb,
lib/fb_graph2/edge/tagged.rb,
lib/fb_graph2/friend_list.rb,
lib/fb_graph2/edge/friends.rb,
lib/fb_graph2/edge/accounts.rb,
lib/fb_graph2/edge/statuses.rb,
lib/fb_graph2/edge/interests.rb,
lib/fb_graph2/edge/activities.rb,
lib/fb_graph2/edge/television.rb,
lib/fb_graph2/edge/achievements.rb,
lib/fb_graph2/edge/friend_lists.rb,
lib/fb_graph2/attribute_assigner.rb,
lib/fb_graph2/request_filter/debugger.rb,
lib/fb_graph2/request_filter/authenticator.rb
Defined Under Namespace
Modules: AttributeAssigner, RequestFilter
Classes: Achievement, Album, Application, Collection, Edge, Event, FriendList, Group, Node, Page, Post, User
Class Method Summary
collapse
Class Method Details
.debug! ⇒ Object
20
21
22
23
|
# File 'lib/fb_graph2.rb', line 20
def debug!
Rack::OAuth2.debug!
self.debugging = true
end
|
.debugging? ⇒ Boolean
17
18
19
|
# File 'lib/fb_graph2.rb', line 17
def debugging?
!!self.debugging
end
|
.http_client(access_token = nil) ⇒ Object
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/fb_graph2.rb', line 25
def http_client(access_token = nil)
_http_client_ = HTTPClient.new(
agent_name: "FbGraph2 (#{gem_version})"
)
_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) ⇒ Object
37
38
39
40
|
# File 'lib/fb_graph2.rb', line 37
def http_config(&block)
Rack::OAuth2.http_config &block unless Rack::OAuth2.http_config
self._http_config_ ||= block
end
|
.root_url ⇒ Object
13
14
15
|
# File 'lib/fb_graph2.rb', line 13
def root_url
File.join('https://graph.facebook.com', api_version)
end
|