Public APIs that plugin can use
public interface IPublicAPI
name | description |
---|---|
AddActionKeyword(…) | Add ActionKeyword for specific plugin |
ChangeQuery(…) | Change Flow.Launcher query |
CheckForNewUpdate() | Check for new Flow Launcher update |
CopyToClipboard(…) | Copy Text to clipboard |
FuzzySearch(…) | Fuzzy Search the string with the given query. This is the core search mechanism Flow uses |
GetAllPlugins() | Get all loaded plugins |
GetTranslation(…) | Get translation of current language You need to implement IPluginI18n if you want to support multiple languages for your plugin |
HttpDownloadAsync(…) | Download the specific url to a certain file path |
HttpGetStreamAsync(…) | Http download the specific url and return as stream |
HttpGetStringAsync(…) | Http download the specific url and return as string |
LoadSettingJsonStorage<T>() | Load JsonStorage for current plugin's setting. This is the method used to load settings from json in Flow. When the file is not exist, it will create a new instance for the specific type. |
LogDebug(…) | Log debug message Message will only be logged in Debug mode |
LogException(…) | Log an Exception. Will throw if in debug mode so developer will be aware, otherwise logs the error message. This is the primary logging method used for Flow |
LogInfo(…) | Log info message |
LogWarn(…) | Log warning message |
OpenDirectory(…) | Open directory in an explorer configured by user via Flow's Settings. The default is Windows Explorer |
OpenSettingDialog() | Open setting dialog |
OpenUrl(…) | Opens the url. The browser and mode used is based on what's configured in Flow's default browser settings. |
RegisterGlobalKeyboardCallback(…) | Register a callback for Global Keyboard Event |
ReloadAllPluginData() | Reloads any Plugins that have the IReloadable implemented. It refreshes Plugin's in memory data with new content added by user. |
RemoveActionKeyword(…) | Remove ActionKeyword for specific plugin |
RemoveGlobalKeyboardCallback(…) | Remove a callback for Global Keyboard Event |
RestartApp() | Restart Flow Launcher |
SaveAppAllSettings() | Save everything, all of Flow Launcher and plugins' data and settings |
SavePluginSettings() | Save all Flow's plugins settings |
SaveSettingJsonStorage<T>() | Save JsonStorage for current plugin's setting. This is the method used to save settings to json in Flow.Launcher This method will save the original instance loaded with LoadJsonStorage. This API call is for manually Save. Flow will automatically save all setting type that has called LoadSettingJsonStorage or SaveSettingJsonStorage previously. |
ShellRun(…) | Run a shell command |
ShowMainWindow() | Show the MainWindow when hiding |
ShowMsg(…) | Show message box (2 methods) |
ShowMsgError(…) | Show the error message using Flow's standard error icon. |
- namespace Flow.Launcher.Plugin