Main page
Recent changes
Random page
Help about MediaWiki
NeoWiki
Manage subjects
Page
Discussion
View history
Data
Not logged in
Talk
Contributions
Create account
Log in
Editing
Knowledge Wiki Forever
(section)
From NeoWiki
Jump to:
navigation
,
search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Lua API via <code>mw.neowiki</code> == The newer Lua API is one of the biggest additions. It exposes structured data directly to Scribunto modules. <pre>local nw = require( 'mw.neowiki' ) local founded = nw.getValue( 'Founded at', { page = 'ACME Inc' } ) local products = nw.getAll( 'Products', { page = 'ACME Inc' } ) local subject = nw.getMainSubject( 'ACME Inc' ) local sameSubject = nw.getSubject( 's1demo1aaaaaaa1' ) local children = nw.getChildSubjects( 'ACME Inc' ) local schema = nw.getSchema( 'Company' ) local museums = nw.query( 'MATCH (m:Museum) RETURN m.name AS name, m.`Annual visitors` AS visitors ORDER BY visitors DESC LIMIT 3' )</pre> Functions now documented and available in the updated extension include: * <code>getValue</code> * <code>getAll</code> * <code>getMainSubject</code> * <code>getSubject</code> * <code>getChildSubjects</code> * <code>getSchema</code> * <code>query</code>
Summary:
Please note that all contributions to NeoWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
NeoWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Tools
What links here
Related changes
Special pages
Page information