Skip to content

Commit

Permalink
Add advanced example
Browse files Browse the repository at this point in the history
  • Loading branch information
Garulf committed Nov 17, 2023
1 parent 535e125 commit a9259e3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,25 @@ def query(query: str) -> ResultResponse:
plugin.run()
```

#### Advanced plugin
```
from pyflowlauncher import Plugin, Result, Method
from pyflowlauncher.result import, ResultResponse
plugin = Plugin()
class Query(Method):
def __call__(self, query: str) -> ResultResponse:
r = Result(
Title="This is a title!",
SubTitle="This is the subtitle!"
)
self.add_result(r)
return self.return_results
plugin.add_method(Query())
plugin.run()
```

0 comments on commit a9259e3

Please sign in to comment.