Permalink
Browse files

added query options to posts.all

  • Loading branch information...
1 parent 1e537a3 commit d899fde4dae41e6f74ef91090538229be4a0755f @hng committed Dec 7, 2011
Showing with 5 additions and 2 deletions.
  1. +1 −0 Gemfile
  2. +4 −2 lib/pinboard/client.rb
View
@@ -4,4 +4,5 @@ platforms :jruby do
gem 'jruby-openssl', '~> 0.7'
end
+
gemspec
@@ -10,8 +10,10 @@ def initialize(options={})
:password => options[:password] }
end
- def posts
- options = { :basic_auth => @auth }
+ def posts(params={})
+ options = {}
+ options[:basic_auth] = @auth
+ options[:query] = params
posts = self.class.get('/posts/all', options)['posts']['post']
posts.map { |p| Post.new(Util.symbolize_keys(p)) }
end

0 comments on commit d899fde

Please sign in to comment.