From 8063fab924df609c8a75318140fc477b9d50db45 Mon Sep 17 00:00:00 2001 From: Tib3rius <48113936+Tib3rius@users.noreply.github.com> Date: Sun, 12 Jun 2022 00:13:24 -0400 Subject: [PATCH] Updated API Documentation (markdown) --- API-Documentation.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/API-Documentation.md b/API-Documentation.md index 9acd572..c7b2206 100644 --- a/API-Documentation.md +++ b/API-Documentation.md @@ -252,7 +252,19 @@ Resulting Value: baz2 (string) *** -#### get_option(name) -The `get_option` method is used to retrieve the value of an option (either set by the user or the default) that the plugin has previously configured. The `name` argument should be the same value as the `name` argument of the original option. +#### get_option(name, default=None) +The `get_option` method is used to retrieve the value of an option (either set by the user or the default) that the plugin has previously configured. The `name` argument should be the same value as the `name` argument of the original option. In the event that an option was defined without a default value, the optional `default` argument can be set to a default value of your choice. -This method should only be used in the run() coroutine of a plugin. \ No newline at end of file +This method should only be used in the run() coroutine of a plugin. + +*** + +#### get_global_option(name, default=None) +The `get_global_option` method is used to retrieve the value of a global option (either set by the user or the default). The `name` argument should be the same value as the `name` argument of the global option. The optional `default` argument can be set to a default value of your choice. + +This method can be used in the run() coroutine and the manual() method of a plugin. + +*** + +#### get_global(name, default=None) +The `get_global_option` method is an alias for the `get_global_option` method. \ No newline at end of file