Class: FaceGroup::Group
- Inherits:
-
Object
- Object
- FaceGroup::Group
- Defined in:
- lib/facegroup/group.rb
Overview
Main class to setup a Facebook group
Instance Attribute Summary collapse
-
#feed ⇒ Object
readonly
Returns the value of attribute feed.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(group_data:) ⇒ Group
constructor
A new instance of Group.
Constructor Details
Instance Attribute Details
#feed ⇒ Object (readonly)
Returns the value of attribute feed.
8 9 10 |
# File 'lib/facegroup/group.rb', line 8 def feed @feed end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/facegroup/group.rb', line 8 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/facegroup/group.rb', line 8 def name @name end |
Class Method Details
.find(id:) ⇒ Object
16 17 18 19 |
# File 'lib/facegroup/group.rb', line 16 def self.find(id:) group_data = FbApi.group_data(id) group_data.include?('error') ? nil : new(group_data: group_data) end |
.latest_postings(id:) ⇒ Object
21 22 23 |
# File 'lib/facegroup/group.rb', line 21 def self.latest_postings(id:) FbApi.newest_group_postings(id) end |