Open bytersproblem opened 2 years ago
I dug up some more logs. Here's what it says:
2021-09-24 20:25:50,001 | DEBUG | ulauncher.api.server.ExtensionController: _send_event() | Send event KeywordQueryEvent to "com.github.sebw.ulauncher-shaarli"
com.github.sebw.ulauncher-shaarli | 2021-09-24 20:25:50,035 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent
com.github.sebw.ulauncher-shaarli | 2021-09-24 20:25:50,036 | INFO | __main__: on_event() | preferences {"demo_kw": "shaarli", "setting_url": "https://shaarli.host.com/shaarli/", "setting_api": "f9157c1a4c94", "setting_limit": "10"}
com.github.sebw.ulauncher-shaarli | 2021-09-24 20:25:50,046 | DEBUG | urllib3.connectionpool: _new_conn() | Starting new HTTPS connection (1): shaarli.host.com:443
com.github.sebw.ulauncher-shaarli | 2021-09-24 20:25:50,216 | DEBUG | urllib3.connectionpool: _make_request() | https://shaarli.host.com:443 "GET /shaarli/api/v1/links?limit=10 HTTP/1.1" 401 16
This extension relies on the shaarli-client library. You seem to get a 401. Is the API token valid?
Can you run and check if the following works in a python console?
import shaarli_client.client as c
response = c.ShaarliV1Client("https://your/shaarli","your-api-token")
answer = response.get_links({'searchtags': "a-tag-in-your-shaarli", 'limit': "1"})
answer.text
Thanks!
I have Shaarli on a Yunohost setup. But, it does not show the result of the query. I checked the logs, here is what outputs: