Commit 9d3c9e33 by Rocky Duan

fixed tag autocomplete

parent 1f4d2f3d
......@@ -22,6 +22,9 @@ def search_trending_tags(course_id, query_params={}, *args, **kwargs):
attributes = dict(default_params.items() + query_params.items())
return perform_request('get', _url_for_search_trending_tags(), attributes, *args, **kwargs)
def tags_autocomplete(value, *args, **kwargs):
return perform_request('get', _url_for_threads_tags_autocomplete(), {'value': value}, *args, **kwargs)
def _url_for_search_similar_threads():
return "{prefix}/search/threads/more_like_this".format(prefix=settings.PREFIX)
......@@ -30,3 +33,6 @@ def _url_for_search_recent_active_threads():
def _url_for_search_trending_tags():
return "{prefix}/search/tags/trending".format(prefix=settings.PREFIX)
def _url_for_threads_tags_autocomplete():
return "{prefix}/threads/tags/autocomplete".format(prefix=settings.PREFIX)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment