Class: FbGraph::Page
- Extended by:
- Searchable
- Includes:
- Connections::Albums, Connections::Checkins, Connections::Events, Connections::Feed, Connections::Groups, Connections::Insights, Connections::Links, Connections::Notes, Connections::Photos, Connections::Picture, Connections::Posts, Connections::Statuses, Connections::Tagged, Connections::Videos
- Defined in:
- lib/fb_graph/page.rb
Instance Attribute Summary collapse
-
#can_post ⇒ Object
Returns the value of attribute can_post.
-
#category ⇒ Object
Returns the value of attribute category.
-
#checkin_count ⇒ Object
Returns the value of attribute checkin_count.
-
#company_overview ⇒ Object
Returns the value of attribute company_overview.
-
#created_time ⇒ Object
Returns the value of attribute created_time.
-
#founded ⇒ Object
Returns the value of attribute founded.
-
#general_info ⇒ Object
Returns the value of attribute general_info.
-
#is_community_page ⇒ Object
Returns the value of attribute is_community_page.
-
#like_count ⇒ Object
Returns the value of attribute like_count.
-
#link ⇒ Object
Returns the value of attribute link.
-
#location ⇒ Object
Returns the value of attribute location.
-
#mission ⇒ Object
Returns the value of attribute mission.
-
#name ⇒ Object
Returns the value of attribute name.
-
#products ⇒ Object
Returns the value of attribute products.
-
#release_date ⇒ Object
Returns the value of attribute release_date.
-
#username ⇒ Object
Returns the value of attribute username.
-
#website ⇒ Object
Returns the value of attribute website.
-
#websites ⇒ Object
Returns the value of attribute websites.
-
#with ⇒ Object
Returns the value of attribute with.
Attributes inherited from Node
#access_token, #endpoint, #identifier
Instance Method Summary collapse
-
#initialize(identifier, attributes = {}) ⇒ Page
constructor
A new instance of Page.
Methods included from Searchable
Methods included from Connections::Videos
Methods included from Connections::Tagged
Methods included from Connections::Statuses
Methods included from Connections::Posts
Methods included from Connections::Picture
Methods included from Connections::Photos
Methods included from Connections::Notes
Methods included from Connections::Links
Methods included from Connections::Insights
Methods included from Connections::Groups
Methods included from Connections::Feed
Methods included from Connections::Events
Methods included from Connections::Checkins
Methods included from Connections::Albums
Methods inherited from Node
#connection, #destroy, fetch, #fetch
Methods included from Comparison
Constructor Details
#initialize(identifier, attributes = {}) ⇒ Page
Returns a new instance of Page.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/fb_graph/page.rb', line 21 def initialize(identifier, attributes = {}) super @name = attributes[:name] @username = attributes[:username] @link = attributes[:link] @category = attributes[:category] if (founded = attributes[:founded]) @founded = Date.parse(founded) rescue Date.new(founded.to_i) end @can_post = attributes[:can_post] @is_community_page = attributes[:is_community_page] @company_overview = attributes[:company_overview] @general_info = attributes[:general_info] @mission = attributes[:mission] if (products = attributes[:products]) @products = products.split("\n") end if (release_date = attributes[:release_date]) @release_date = Date.parse(release_date) rescue release_date end if (location = attributes[:location]) @location = Venue.new(location) end @website = attributes[:website] @websites = attributes[:website].to_s.split @like_count = attributes[:likes] @checkin_count = attributes[:checkins] @with = [] if attributes[:with] attributes[:with].each do |user| @with << User.new(user.delete(:id), user) end end if attributes[:created_time] @created_time = Time.parse(attributes[:created_time]).utc end end |
Instance Attribute Details
#can_post ⇒ Object
Returns the value of attribute can_post.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def can_post @can_post end |
#category ⇒ Object
Returns the value of attribute category.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def category @category end |
#checkin_count ⇒ Object
Returns the value of attribute checkin_count.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def checkin_count @checkin_count end |
#company_overview ⇒ Object
Returns the value of attribute company_overview.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def company_overview @company_overview end |
#created_time ⇒ Object
Returns the value of attribute created_time.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def created_time @created_time end |
#founded ⇒ Object
Returns the value of attribute founded.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def founded @founded end |
#general_info ⇒ Object
Returns the value of attribute general_info.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def general_info @general_info end |
#is_community_page ⇒ Object
Returns the value of attribute is_community_page.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def is_community_page @is_community_page end |
#like_count ⇒ Object
Returns the value of attribute like_count.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def like_count @like_count end |
#link ⇒ Object
Returns the value of attribute link.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def link @link end |
#location ⇒ Object
Returns the value of attribute location.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def location @location end |
#mission ⇒ Object
Returns the value of attribute mission.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def mission @mission end |
#name ⇒ Object
Returns the value of attribute name.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def name @name end |
#products ⇒ Object
Returns the value of attribute products.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def products @products end |
#release_date ⇒ Object
Returns the value of attribute release_date.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def release_date @release_date end |
#username ⇒ Object
Returns the value of attribute username.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def username @username end |
#website ⇒ Object
Returns the value of attribute website.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def website @website end |
#websites ⇒ Object
Returns the value of attribute websites.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def websites @websites end |
#with ⇒ Object
Returns the value of attribute with.
19 20 21 |
# File 'lib/fb_graph/page.rb', line 19 def with @with end |