diff --git a/lib/se/api/types/comment.rb b/lib/se/api/types/comment.rb index 689bd04..51cfa62 100644 --- a/lib/se/api/types/comment.rb +++ b/lib/se/api/types/comment.rb @@ -3,7 +3,7 @@ module SE module API class Comment - attr_reader :body, :link, :id, :post_id, :score, :type, :created_at, :author, :body_markdown, :edited + attr_reader :body, :link, :id, :post_id, :score, :type, :created_at, :author, :body_markdown, :edited, :post_type attr_reader :json def initialize(item_json) @@ -13,6 +13,7 @@ def initialize(item_json) @link = @json["link"] @edited = (@json["edited"] == "true") @post_id = @json["post_id"].to_i + @post_type = @json["post_type"] @score = @json["score"].to_i @type = @json["post_type"] @id = @json["comment_id"].to_i