-
Notifications
You must be signed in to change notification settings - Fork 683
API Keys
ThePotatoGuy edited this page Sep 24, 2022
·
2 revisions
Keys are defined by a "feature name", that must be unique.
Keys are loaded in init level -980. API Keys are NOT stored in persistent..
They are loaded from a separate JSON file called api_keys.json
inside the same folder persistents are stored in.
To access and use API keys, see the API below.
Gets API key for a specific feature.
Params:
-
feature
- string name of the feature to get the API key for
RETURNS the API key as string if found, null string if not found
Checks if a feature has an API key.
Params:
-
feature
- string name of the feature to check API key for
RETURNS true if the feature has an API key, false otherwise
-
feature
- string name of the feature to register API key for -
display_name
- name the feature should use when shown in the API Keys screen -
on_change
- function to run when the API key is changed (includes both adding a key and removing a key)- Default:
None
- Default: