lib/fb_graph/post.rb in fb_graph-1.8.6 vs lib/fb_graph/post.rb in fb_graph-1.9.0
- old
+ new
@@ -2,11 +2,11 @@
class Post < Node
include Connections::Comments
include Connections::Likes
extend Searchable
- attr_accessor :from, :to, :message, :picture, :link, :name, :caption, :description, :source, :icon, :attribution, :actions, :type, :privacy, :targeting, :created_time, :updated_time
+ attr_accessor :from, :to, :message, :picture, :link, :name, :caption, :description, :source, :properties, :icon, :actions, :privacy, :type, :graph_object_id, :application, :targeting, :created_time, :updated_time
def initialize(identifier, attributes = {})
super
if (from = attributes[:from])
@from = if from[:category]
@@ -38,24 +38,33 @@
@link = attributes[:link]
@name = attributes[:name]
@caption = attributes[:caption]
@description = attributes[:description]
@source = attributes[:source]
- @icon = attributes[:icon]
- @attribution = attributes[:attribution]
- @actions = []
+ @properties = []
+ if attributes[:properties]
+ attributes[:properties].each do |property|
+ @properties << Property.new(property)
+ end
+ end
+ @icon = attributes[:icon]
+ @actions = []
if attributes[:actions]
attributes[:actions].each do |action|
@actions << Action.new(action)
end
end
- @type = attributes[:type]
if attributes[:privacy]
@privacy = if attributes[:privacy].is_a?(Privacy)
attributes[:privacy]
else
Privacy.new(attributes[:privacy])
end
+ end
+ @type = attributes[:type]
+ @graph_object_id = attributes[:object_id]
+ if attributes[:application]
+ @application = Application.new(attributes[:application][:id], attributes[:application])
end
if attributes[:targeting]
@targeting = if attributes[:targeting].is_a?(Targeting)
attributes[:targeting]
else
\ No newline at end of file