You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let txt =`Whistling is featured in a number of television shows, such as [[Lassie (1954 TV series)|''Lassie'']], and the title theme for ''[[The X-Files]]''.`
The wikipedia api is [pretty welcoming](https://www.mediawiki.org/wiki/API:Etiquette#Request_limit) though recommends three things, if you're going to hit it heavily -
@@ -497,6 +498,7 @@ wtf
497
498
-**.isRedirect()** - if the page is just a redirect to another page
498
499
-**.redirectTo()** - the page this redirects to
499
500
-**.isDisambiguation()** - is this a placeholder page to direct you to one-of-many possible pages
501
+
-**.isStub()** - if the page is flagged as incomplete
500
502
-**.categories()** - return all categories of the document
501
503
-**.sections()** - return a list of the Document's sections
502
504
-**.paragraphs()** - return a list of Paragraphs, in all sections
@@ -512,6 +514,10 @@ wtf
512
514
-**.text()** - plaintext, human-readable output for the page
513
515
-**.json()** - a 'stringifyable' output of the page's main data
514
516
-**.wikitext()** - original wiki markup
517
+
-**.description()** - get/set the page's short description, if we have one.
518
+
-**.pageImage()** - get/set the page's representative image, if we have one.
519
+
-**.revisionID()** - get/set the latest edit id of the page, if we have it.
520
+
-**.timestamp()** - get/set the time of the most recent edit of the page, if we have it.
515
521
516
522
### Section
517
523
@@ -659,12 +665,12 @@ by default, if there's no parser for a template, it will be just ignored and gen
659
665
However, it's possible to configure a fallback parser function to handle these templates:
660
666
661
667
```js
662
-
wtf('some {{weird_template}} here', {
668
+
wtf('some {{weird_template}} here', {
663
669
templateFallbackFn: (tmpl, list, parse) => {
664
670
let obj =parse(tmpl) //or do a custom regex
665
671
list.push(obj)
666
672
return'[unsupported template]'// or return null to ignore this template
0 commit comments