Class: FaceGroup::Posting
- Inherits:
-
Object
- Object
- FaceGroup::Posting
- Defined in:
- lib/facegroup/posting.rb
Overview
Single posting on group’s feed
Instance Attribute Summary collapse
-
#attachment ⇒ Object
readonly
Returns the value of attribute attachment.
-
#created_time ⇒ Object
readonly
Returns the value of attribute created_time.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#updated_time ⇒ Object
readonly
Returns the value of attribute updated_time.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data: nil) ⇒ Posting
constructor
A new instance of Posting.
Constructor Details
#initialize(data: nil) ⇒ Posting
Returns a new instance of Posting.
11 12 13 |
# File 'lib/facegroup/posting.rb', line 11 def initialize(data: nil) load_data(data) end |
Instance Attribute Details
#attachment ⇒ Object (readonly)
Returns the value of attribute attachment.
8 9 10 |
# File 'lib/facegroup/posting.rb', line 8 def @attachment end |
#created_time ⇒ Object (readonly)
Returns the value of attribute created_time.
8 9 10 |
# File 'lib/facegroup/posting.rb', line 8 def created_time @created_time end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/facegroup/posting.rb', line 8 def id @id end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
8 9 10 |
# File 'lib/facegroup/posting.rb', line 8 def @message end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/facegroup/posting.rb', line 8 def name @name end |
#updated_time ⇒ Object (readonly)
Returns the value of attribute updated_time.
8 9 10 |
# File 'lib/facegroup/posting.rb', line 8 def updated_time @updated_time end |
Class Method Details
.find(id:) ⇒ Object
15 16 17 18 |
# File 'lib/facegroup/posting.rb', line 15 def self.find(id:) posting_data = FaceGroup::FbApi.posting_data(id) posting_data.keys.include?('error') ? nil : new(data: posting_data) end |