diff --git a/boards/default_src/micropython/origin/build/lib/mixiot.py b/boards/default_src/micropython/origin/build/lib/mixiot.py index e5e2588b..28822d7d 100644 --- a/boards/default_src/micropython/origin/build/lib/mixiot.py +++ b/boards/default_src/micropython/origin/build/lib/mixiot.py @@ -355,9 +355,9 @@ class MQTTClient: self._tiny_web_db.set_url(url) return self._tiny_web_db.count() - def tiny_web_db_search(self, url, count): + def tiny_web_db_search(self, url, no=1, count=1, tag='', dtype='both'): self._tiny_web_db.set_url(url) - return self._tiny_web_db.search(count) + return self._tiny_web_db.search(no, count, tag, dtype) def tiny_web_db_delete(self, url, key): self._tiny_web_db.set_url(url) @@ -390,9 +390,10 @@ class TinyWebDB: raise RuntimeError(result["message"]) return int(result["count"]) - def search(self, count): + def search(self, no=1, count=1, tag='', dtype='both'): + no = str(no) count = str(count) - result = self._request("search", "count={}".format(count)) + result = self._request("search", "no={}&count={}&tag={}&type={}".format(no, count, tag, dtype)) if result["status"] == "error": raise RuntimeError(result["message"]) return result["data"]