lib/pinboard/post.rb in pinboard-0.0.4 vs lib/pinboard/post.rb in pinboard-0.0.5

- old
+ new

@@ -1,13 +1,13 @@ module Pinboard - class Post < Struct.new(:href, :description, :tag, :time) + class Post < Struct.new(:href, :description, :extended, :tag, :time, :replace, :shared, :toread) def self.all(options={}) client = Pinboard::Client.new(options) posts = client.class.get('/posts/all', :basic_auth => options)['posts']['post'] posts.map { |p| Post.new(Util.symbolize_keys(p)) } end - + def initialize(attributes={}) self.time = Util.parse_time(attributes.delete(:time)) self.tag = attributes.delete(:tag).split(" ") attributes.each do |attribute, value|