/dev/api: Add uses_site to /api/info.

You can specify the subreddit to clamp results to that subreddit.
This commit is contained in:
Neil Williams
2014-01-08 11:30:50 -08:00
parent e8e2b3fc64
commit 5b370eb422

View File

@@ -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