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

Search domain instead of /api/info.json for domains. It doesn't appear ... #23

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
6 changes: 2 additions & 4 deletions lib/redditkit/client/links.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,10 @@ def link(link_full_name)
# @option options [String] :after Only return links after this identifier.
# @return [RedditKit::PaginatedResponse]
# @example links = RedditKit.links_with_domain "github.com"
def links_with_domain(domain, options = {})
def links_with_domain(domain, sort = "new", options = {})
parameters = { :url => domain, :t => options[:time] }
options.merge! parameters
options.delete :t

objects_from_response(:get, 'api/info.json', options)
objects_from_response(:get, "domain/#{domain}/#{sort}.json", options)
end

# Submits a link or self post to reddit.
Expand Down
2 changes: 1 addition & 1 deletion lib/redditkit/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module RedditKit
class Version
MAJOR = 1
MINOR = 0
PATCH = 1
PATCH = 6

class << self

Expand Down