From 2462d6768abb416cc7da198e671caecd797daa7f Mon Sep 17 00:00:00 2001 From: Henry Le Grys Date: Fri, 23 Oct 2020 12:28:21 +0100 Subject: [PATCH] Allow filtering by tier in search call --- jaken/rpc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jaken/rpc.py b/jaken/rpc.py index 68dbea2..2bae52c 100644 --- a/jaken/rpc.py +++ b/jaken/rpc.py @@ -12,8 +12,8 @@ class SoulServer: await self.soul_client.connect() @router.expose - async def search_cards(self, search_term): - r = await self.soul_client.call("cardindex", {"search": search_term}) + async def search_cards(self, search_term, tier=None): + r = await self.soul_client.call("cardindex", {"search": search_term, "category": tier}) cards = [Card(doc).to_dict() for doc in r['data']['docs']] return cards