Skip to content
This repository has been archived by the owner on Mar 17, 2020. It is now read-only.

Commit

Permalink
getting certain resources via id.
Browse files Browse the repository at this point in the history
  • Loading branch information
plukevdh committed Apr 25, 2011
1 parent 5aaaf00 commit 694c260
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/readability/client.rb
Expand Up @@ -20,12 +20,13 @@ def get(resource="", args={})
data = data[resource.to_s] unless resource.blank?
data
else
raise StandardError, "Could not get data."
raise StandardError, "Could not get data for those params."
end
end

def format_query(resource, args)
query = "#{BASE_API}/#{resource}"
query << "/#{args.delete :id}" if args.include? :id
query << "?#{parameterize(args)}" unless args.empty?
query
end
Expand Down
2 changes: 1 addition & 1 deletion readability.gemspec
Expand Up @@ -9,7 +9,7 @@ Gem::Specification.new do |s|
s.description = "This gem/engine allows you to access Readability APIs."

s.files = Dir["{app,lib,config}/**/*"] + ["MIT-LICENSE", "Rakefile", "Gemfile", "README.markdown"]
s.version = "0.0.5"
s.version = "0.0.6"

s.add_dependency('yajl-ruby')
s.add_dependency('oauth')
Expand Down

0 comments on commit 694c260

Please sign in to comment.