Skip to main content

plugin

The plugin object provides functions for obtaining data pertaining to plugin settings and keys. Other methods included are used to obtain ID mappings for plugin-related data.

Methods

keyTypes

pb.plugin.keyTypes()

Returns an ID map of each plugin key type where each entry represents a key type's numerical ID.

Returns: Object - Key type to ID map.

keyTypeNames

pb.plugin.keyTypeNames()

Returns an ID map of each plugin key type where each entry represents a key type's name as depicted on the forum.

Returns: Object - Key ID to name map.

statusCodes

pb.plugin.statusCodes()

Returns an ID map of each plugin error type where each entry represents the error's numerical ID.

Returns: Object - Error type to ID map.

get

pb.plugin.get(pluginId)

Returns an object containing the specified plugin's data.

Returns: Plugin - The plugin object.

ParamTypeDescription
pluginIdstringThe ID of the plugin as specified in its settings within the plugin editor.

getAvailablePageMetadataKeys

pb.plugin.getAvailablePageMetadataKeys()

Use this function to view available PageMetadataKey values for the current page. These values can be used with Plugin Key functions like "set" and "push" that make have the metadata option.

Plugin

The corresponding plugin object is returned when using the "get" function. This plugin object contains the plugin's unique developer-specified ID, the current version of the plugin, the images stored within the plugin, and its settings.

PageMetadataKey

Depending on the page the user is on, there is various metadata about that page that can be accessed. This data can be viewed by using "pb.data.get('page')". PageMetadataKey is a string that acts as a key to access a specific metadata property. Use the function "pb.plugin.getAvailablePageMetadataKeys()" to see what PageMetadataKey values are available for the current page. Some pages may not have any metadata available.