JSON-RPC is a remote procedure call protocol encoded in JSON.
In Flow Launcher, we use JSON-RPC as a local procedure call protocol to bind Flow and other program languages (Python plugin and JavaScript/TypeScript plugin).
So we need to build a common API between Flow and Plugin.
-->denotes data sent to FLow.<--denotes data coming from Flow.
--> {"method": "query", "parameters": [""]}
<-- {"Title": "title", "SubTitle": "sub title", "IconPath": "favicon.ico"}API is located here
Flow.Launcher.ChangeQuery: change flow launcher queryFlow.Launcher.RestartApp: restart Flow LauncherFlow.Launcher.SaveAppAllSettings: save all Flow Launcher settingsFlow.Launcher.CheckForNewUpdate: check for new Flow Launcher updateFlow.Launcher.ShellRun: run shell commandsFlow.Launcher.CloseApp: close flow launcherFlow.Launcher.HideApp: hide flow launcherFlow.Launcher.ShowApp: show flow launcherFlow.Launcher.ShowMsg: show messageboxFlow.Launcher.GetTranslation: get translation of current languageFlow.Launcher.OpenSettingDialog: open setting dialogFlow.Launcher.GetAllPlugins: get all loaded pluginsFlow.Launcher.StartLoadingBar: start loading animation in flow launcherFlow.Launcher.StopLoadingBar: stop loading animation in flow launcherFlow.Launcher.ReloadAllPluginData: reload all flow launcher plugins
{
"method": "Flow Launcher API Name",
"parameters": []
}query, stringrequery, bool
{
"method": "Flow.Launcher.ChangeQuery",
"parameters": [query, requery]
}cmd, string
{
"method": "Flow.Launcher.ShellRun",
"parameters": [cmd]
}title, stringsub_title, stringico_path, string(path)
{
"method": "Flow.Launcher.ShowMsg",
"parameters": [title, sub_title, ico_path]
}