library.getInfo: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page library.getInfo to Library.getInfo without leaving a redirect: Converting page title to first-letter uppercase)
m (Oops, it's "source" that should be replaced with "syntaxhighlight")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
|name=library.getInfo
|name=library.getInfo
|proposed=true
|proposed=false
|trusted=false
|trusted=false
|version=1.11.0
|version=1.11.0
Line 39: Line 39:
|also=
|also=
{{func|library.getContents}}, {{func|library.listAddOnLibraries}}, {{func|library.listTokenLibraries}}  
{{func|library.getContents}}, {{func|library.listAddOnLibraries}}, {{func|library.listTokenLibraries}}  
|changes=
|changes=
* '''1.11.0''' - Function added
* '''1.11.0''' - Function added
}}
}}
[[Category:Library Function]]
[[Category:Library Function]]
[[Category:Add-on Library Functions]]

Latest revision as of 23:59, 11 February 2024

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