From b25d47a7fe9c30f171365472af7a4ebfa954ae20 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 22 Mar 2013 11:05:36 +0000 Subject: [PATCH] More API examples --- .../tiddlers/TiddlyWikiArchitecture.tid | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/editions/tw5.com/tiddlers/TiddlyWikiArchitecture.tid b/editions/tw5.com/tiddlers/TiddlyWikiArchitecture.tid index c7da7f521..58bf34e93 100644 --- a/editions/tw5.com/tiddlers/TiddlyWikiArchitecture.tid +++ b/editions/tw5.com/tiddlers/TiddlyWikiArchitecture.tid @@ -18,4 +18,28 @@ If the tiddler `HelloThere` is visible then you'll see it instantly change to re $tw.wiki.addTiddler({title: "IntentionallyMissingTiddler", text: "This tiddler now exists"}); ``` +This example deletes a tiddler: + +``` +$tw.wiki.deleteTiddler("HelloThere") +``` + +This example retrieves all the outgoing links from a tiddler: + +``` +$tw.wiki.getTiddlerLinks("HelloThere") +``` + +This example retrieves all the incoming links to a tiddler: + +``` +$tw.wiki.getTiddlerLinks("HelloThere") +``` + +This example retrieves the titles of all the tiddlers matching a TiddlerFilter expression: + +``` +$tw.wiki.filterTiddlers("[tag[docs]sort[modified]]")` +``` + If you're interested in understanding more about the internal operation of TiddlyWiki, it is recommended that you review the DeveloperDocs and read the code -- start with the boot kernel [[$:/core/boot.js]].