mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-24 14:27:58 -05:00
/dev/api: Add uses_site to /api/info.
You can specify the subreddit to clamp results to that subreddit.
This commit is contained in:
@@ -145,7 +145,7 @@ class ApiController(RedditController, OAuth2ResourceController):
|
||||
@validate(link1 = VUrl(['url']),
|
||||
link2 = VByName('id'),
|
||||
count = VLimit('limit'))
|
||||
@api_doc(api_section.links_and_comments)
|
||||
@api_doc(api_section.links_and_comments, uses_site=True)
|
||||
def GET_info(self, link1, link2, count):
|
||||
"""Get a link by fullname or a list of links by URL.
|
||||
|
||||
@@ -155,6 +155,9 @@ class ApiController(RedditController, OAuth2ResourceController):
|
||||
|
||||
If both `url` and `id` are provided, `id` will take precedence.
|
||||
|
||||
If a subreddit is provided, only links in that subreddit will be
|
||||
returned.
|
||||
|
||||
"""
|
||||
|
||||
c.update_last_visit = False
|
||||
|
||||
Reference in New Issue
Block a user