JSON-RPC API: Understanding V1 vs V2, calling Flow APIs from plugins

Open
#87 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Domain
api, documentation

Research direction

Start with the JSON-RPC documentation page linked in the issue and compare its data-flow diagram and response example with the reported corrections. Then verify which listed methods RPC plugins can call, especially ChangeQuery and ShowMsg. Done means the page accurately explains the request and response directions and presents an API list and plugin-calling guidance that match the implementation.

Written by the indexing model from the issue text.

Description

bug
Checks
  • I have checked that this issue has not already been reported.

  • I am using the latest version of Flow Launcher.

Problem Description

The docs for JSON-RPC appear inaccurate or misleading in three ways: https://www.flowlauncher.com/docs/#/json-rpc

  1. The dataflow --> and <-- is backwards. "Query" is sent from flow to the plugin. Title/Subtitle/IconPath is sent from the plugin to Flow.
  2. The example response from Plugin to Flow is incorrect. Should be:
-<-- {"Title": "title", "SubTitle": "sub title", "IconPath": "favicon.ico"}
+--> {"result": [{"Title": "title", "SubTitle": "sub title", "IcoPath": "favicon.ico"}]}
  1. The API List is misleading because it is impossible for RPC Plugins to call many (all?) of those methods. For example, how is an RPC plugin supposed to call ChangeQuery or ShowMsg?
To Reproduce

No response

Screenshots

No response

Flow Launcher Version

1.19.2

Windows Build Number

22631.4169

Error Log

No response

Dominant language
Svelte
Stars
23
Forks
23
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Flow-Launcher/docs

All issues in Flow-Launcher/docs

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.