diff --git a/lib/se/api/types/post.rb b/lib/se/api/types/post.rb index e7b287c..5e1c4f6 100644 --- a/lib/se/api/types/post.rb +++ b/lib/se/api/types/post.rb @@ -3,7 +3,7 @@ module SE module API class Post - attr_reader :body, :title, :link, :author, :score, :type, :id, :last_activity_date, :created_at, :updated_at + attr_reader :body, :title, :link, :author, :score, :type, :id, :last_activity_date, :created_at, :updated_at, :last_editor attr_reader :json def initialize(item_json) @@ -13,6 +13,7 @@ def initialize(item_json) @link = @json["link"] @score = @json["score"].to_i @type = @json["post_type"] + @last_editor = User.new(@json["last_editor"]) @id = (@json["post_id"] || @json["answer_id"] || @json["question_id"]).to_i @updated_at = @json["last_activity_date"] @created_at = @json["creation_date"]