library.getInfo

From RPTools Wiki
Revision as of 01:51, 21 October 2021 by Phergus (talk | contribs) (Created page with "{{MacroFunction |name=library.getInfo |proposed=true |trusted=false |version=1.11.0 |description= Retrieves various information about a loaded Add-On library. Information is r...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

 Note: This refers to a proposed change that has not been implemented in the main code base yet.

library.getInfo() Function

Introduced in version 1.11.0
Retrieves various information about a loaded Add-On library. Information is returned as a JSON object.

Usage

library.getInfo(namespace)

Parameters

  • namespace - The namespace of the library.

Example

Retrieves the info for the .mtlib library net.rptools.addon.some-lib.
<pre>[r: json.indent(library.getInfo("net.rptools.addon.some-lib"),2)]</pre>

Returns:

[{
  "name": "some-lib",
  "namespace": "net.rptools.addon.some-lib",
  "version": "1.0.0",
  "website": "www.rptools.net",
  "gitUrl": "github.com/RPTools/maptool",
  "authors": ["RPTools Team"],
  "license": "GPL 3.0",
  "description": "My new test library for stuff",
  "shortDescription": "test library",
  "allowsUrlAccess": true
}]

See Also

Version Changes

  • 1.11.0 - Function added