Module: FbGraph2
- Defined in:
- lib/fb_graph2.rb,
lib/fb_graph2/app.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/util.rb,
lib/fb_graph2/album.rb,
lib/fb_graph2/event.rb,
lib/fb_graph2/group.rb,
lib/fb_graph2/offer.rb,
lib/fb_graph2/order.rb,
lib/fb_graph2/photo.rb,
lib/fb_graph2/video.rb,
lib/fb_graph2/domain.rb,
lib/fb_graph2/review.rb,
lib/fb_graph2/struct.rb,
lib/fb_graph2/thread.rb,
lib/fb_graph2/comment.rb,
lib/fb_graph2/message.rb,
lib/fb_graph2/payment.rb,
lib/fb_graph2/request.rb,
lib/fb_graph2/edge/feed.rb,
lib/fb_graph2/edge/home.rb,
lib/fb_graph2/milestone.rb,
lib/fb_graph2/place_tag.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/pokes.rb,
lib/fb_graph2/edge/posts.rb,
lib/fb_graph2/achievement.rb,
lib/fb_graph2/edge/admins.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/offers.rb,
lib/fb_graph2/edge/photos.rb,
lib/fb_graph2/edge/scores.rb,
lib/fb_graph2/edge/tagged.rb,
lib/fb_graph2/edge/videos.rb,
lib/fb_graph2/friend_list.rb,
lib/fb_graph2/struct/poke.rb,
lib/fb_graph2/edge/blocked.rb,
lib/fb_graph2/edge/friends.rb,
lib/fb_graph2/edge/picture.rb,
lib/fb_graph2/notification.rb,
lib/fb_graph2/struct/score.rb,
lib/fb_graph2/app_link_host.rb,
lib/fb_graph2/edge/accounts.rb,
lib/fb_graph2/edge/comments.rb,
lib/fb_graph2/edge/statuses.rb,
lib/fb_graph2/page_category.rb,
lib/fb_graph2/struct/action.rb,
lib/fb_graph2/edge/interests.rb,
lib/fb_graph2/edge/locations.rb,
lib/fb_graph2/struct/picture.rb,
lib/fb_graph2/edge/activities.rb,
lib/fb_graph2/edge/milestones.rb,
lib/fb_graph2/edge/television.rb,
lib/fb_graph2/struct/app_link.rb,
lib/fb_graph2/achievement_type.rb,
lib/fb_graph2/edge/permissions.rb,
lib/fb_graph2/edge/achievements.rb,
lib/fb_graph2/edge/friend_lists.rb,
lib/fb_graph2/edge/shared_posts.rb,
lib/fb_graph2/struct/permission.rb,
lib/fb_graph2/attribute_assigner.rb,
lib/fb_graph2/edge/notifications.rb,
lib/fb_graph2/struct/image_source.rb,
lib/fb_graph2/edge/promotable_posts.rb,
lib/fb_graph2/edge/invitable_friends.rb,
lib/fb_graph2/request_filter/debugger.rb,
lib/fb_graph2/struct/invitable_friend.rb,
lib/fb_graph2/edge/global_brand_children.rb,
lib/fb_graph2/request_filter/authenticator.rb
Defined Under Namespace
Modules: AttributeAssigner, RequestFilter, Util
Classes: Achievement, AchievementType, Album, App, AppLinkHost, Collection, Comment, Domain, Edge, Event, FriendList, Group, Message, Milestone, Node, Notification, Offer, Order, Page, PageCategory, Payment, Photo, PlaceTag, Post, Request, Review, Struct, Thread, User, Video
Class Method Summary
collapse
Class Method Details
.debug! ⇒ Object
21
22
23
24
|
# File 'lib/fb_graph2.rb', line 21
def debug!
Rack::OAuth2.debug!
self.debugging = true
end
|
.debugging? ⇒ Boolean
18
19
20
|
# File 'lib/fb_graph2.rb', line 18
def debugging?
!!self.debugging
end
|
.http_client(access_token = nil) ⇒ Object
26
27
28
29
30
31
32
33
34
35
36
37
|
# File 'lib/fb_graph2.rb', line 26
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
38
39
40
41
|
# File 'lib/fb_graph2.rb', line 38
def http_config(&block)
Rack::OAuth2.http_config &block unless Rack::OAuth2.http_config
self._http_config_ ||= block
end
|
.root_url ⇒ Object
14
15
16
|
# File 'lib/fb_graph2.rb', line 14
def root_url
File.join('https://graph.facebook.com', api_version)
end
|