This commit is contained in:
Kovid Goyal 2011-08-29 17:43:19 -06:00
parent 30b3fdb925
commit e15c223b37

View File

@ -410,6 +410,9 @@ class AjaxServer(object):
@Endpoint() @Endpoint()
def ajax_books_in(self, category, item, sort='title', num=25, offset=0, def ajax_books_in(self, category, item, sort='title', num=25, offset=0,
sort_order='asc'): sort_order='asc'):
'''
Return the books (as list of ids) present in the specified category.
'''
try: try:
dname, ditem = map(decode_name, (category, item)) dname, ditem = map(decode_name, (category, item))
except: except:
@ -471,6 +474,10 @@ class AjaxServer(object):
@Endpoint() @Endpoint()
def ajax_search(self, query='', sort='title', offset=0, num=25, def ajax_search(self, query='', sort='title', offset=0, num=25,
sort_order='asc'): sort_order='asc'):
'''
Return the books (as list of ids) matching the specified search query.
'''
try: try:
num = int(num) num = int(num)
except: except: