Class: FbGraph::Node
- Inherits:
-
Object
- Object
- FbGraph::Node
- Includes:
- Comparison
- Defined in:
- lib/fb_graph/node.rb
Direct Known Subclasses
Achievement, AdAccount, AdCampaign, AdCampaignStat, AdConnectionObject, AdGroup, AdGroupStat, AdKeyword, AdKeywordValid, AdPreview, Album, AppRequest, Application, BroadTargetingCategory, Checkin, Comment, Doc, Domain, Event, FriendList, Group, Insight, Link, Message, Note, Notification, OpenGraph::Action, OpenGraph::Object, Order, Page, Photo, Post, Query, Question, QuestionOption, ReachEstimate, Review, Score, Status, Tab, TaggedObject, Thread, Thread::BeforeTransition, User, UserAchievement, Video
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#identifier ⇒ Object
Returns the value of attribute identifier.
Class Method Summary collapse
Instance Method Summary collapse
- #connection(connection, options = {}) ⇒ Object
- #destroy(options = {}) ⇒ Object
- #fetch(options = {}) ⇒ Object
-
#initialize(identifier, options = {}) ⇒ Node
constructor
A new instance of Node.
- #update(options = {}) ⇒ Object
Methods included from Comparison
Constructor Details
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
7 8 9 |
# File 'lib/fb_graph/node.rb', line 7 def access_token @access_token end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
7 8 9 |
# File 'lib/fb_graph/node.rb', line 7 def endpoint @endpoint end |
#identifier ⇒ Object
Returns the value of attribute identifier.
7 8 9 |
# File 'lib/fb_graph/node.rb', line 7 def identifier @identifier end |
Class Method Details
.fetch(identifier, options = {}) ⇒ Object
23 24 25 |
# File 'lib/fb_graph/node.rb', line 23 def self.fetch(identifier, = {}) new(identifier).fetch() end |
Instance Method Details
#connection(connection, options = {}) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/fb_graph/node.rb', line 27 def connection(connection, = {}) Connection.new( self, connection, .merge( :collection => collection_for(connection, ) ) ) end |
#destroy(options = {}) ⇒ Object
41 42 43 |
# File 'lib/fb_graph/node.rb', line 41 def destroy( = {}) delete end |
#fetch(options = {}) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/fb_graph/node.rb', line 16 def fetch( = {}) [:access_token] ||= self.access_token if self.access_token _fetched_ = get() _fetched_[:access_token] ||= [:access_token] self.class.new(_fetched_[:id], _fetched_) end |
#update(options = {}) ⇒ Object
37 38 39 |
# File 'lib/fb_graph/node.rb', line 37 def update( = {}) post end |