mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 20:57:22 +02:00
Implement #15
This commit is contained in:
@@ -15,11 +15,21 @@ class Wox(object):
|
||||
methods = inspect.getmembers(self, predicate=inspect.ismethod)
|
||||
|
||||
request_method = dict(methods)[request_method_name]
|
||||
results = request_method(request_parameters)
|
||||
print json.dumps({"result": results})
|
||||
results = request_method(*request_parameters)
|
||||
if request_method_name == "query":
|
||||
print json.dumps({"result": results})
|
||||
|
||||
def query(self,query):
|
||||
"""
|
||||
sub class need to override this method
|
||||
"""
|
||||
return []
|
||||
|
||||
class WoxAPI(object):
|
||||
|
||||
@classmethod
|
||||
def wox_change_query(cls,query,requery = False):
|
||||
"""
|
||||
change wox query
|
||||
"""
|
||||
print json.dumps({"method": "Wox.ChangeQuery","parameters":[query,requery]})
|
||||
|
||||
Reference in New Issue
Block a user