Recent Changes - Search:

add Test page

hide

Test


hide

Topics

show

Changed

Visitor's book Site map pmwiki-2.3.32

NZ DoC

MessagesReplacement version 2023-12-30new DebugMessages version 2024-01-14

Testing the Cookbook:NZDoC recipe, see NZDoC


NZDoC version 2024-01-01new

See Cookbook.NZDoC, Cookbook:NZDoC, and https://https://api.doc.govt.nz/.

Note: all these tests use the development version of NZDoC - NZDoCnew

Test

Test the pathological cases.

(:nzdocnew:)

(:nzdocnew:)

(:nzdocnew type=hut id=999999999 content=alert:)
(:nzdocnew type=track id=999999999 content=detail:)
(:nzdocnew type=campsite id=999999999:)

(:nzdocnew type=hut id=999999999 content=alert:) (:nzdocnew type=track id=999999999 content=detail:) (:nzdocnew type=campsite id=999999999:)

(:nzdocnew type=hut id=nothingtobefoundhere:)

(:nzdocnew type=hut id=nothingtobefoundhere:)

(:nzdocnew type=track id=01f85cb8-133e-413d-939b-0d9ba340d1e9 content=detail:)

(:nzdocnew type=track id=01f85cb8-133e-413d-939b-0d9ba340d1e9 content=detail:)

(:nzdocnew type=hut id=100063120 content=detail:)

(:nzdocnew type=hut id=100063120 content=detail:)

(:nzdocnew type=hut id=100094539 content=detail:)

(:nzdocnew type=hut id=100094539 content=detail:)

(:nzdoc type=hut id=100043375 content=detail:)
Candlesticks Bivvy
Candlesticks Bivvy

Candlesticks Bivvy

Candlesticks Bivvy is a Bivvy or Basic hut, located at -42.829, 172.024. There are 2 bunks with heating, toilets - non-flush, water from stream, and water supply. Bookings are not required, usage is first come, first served.
No alerts returned for https://api.doc.govt.nz/v2/huts/100043375/alerts?coordinates=wgs84
(:nzdoc type=hut id=999999999 content=detail:)
(:nzdoc type=track id=DOC-DOC content=region:)
(:nzdoc type=campsite id=999999999 content=alert:)


cURL DoC API error: "The requested URL returned error: 404 " https://api.doc.govt.nz/v2/huts/999999999/detail?coordinates=wgs84

cURL DoC API error: "The requested URL returned error: 400 " https://api.doc.govt.nz/v1/tracks/region/DOC-DOC?coordinates=wgs84

cURL DoC API error: "The requested URL returned error: 404 " https://api.doc.govt.nz/v2/campsites/999999999/alerts?coordinates=wgs84

(:nzdocnew type=hut id=100094539 content=alert:)

(:nzdocnew type=hut id=100094539 content=alert:)

Messages

nzdoc


D:\Home\KiwiWiki\pmwiki\cookbook\nzdocnew.php
: '2024-01-01new'

markup: '/\(:nzdoc\s*(?:(?:(id=(?:[0-9]{9}|[0-9\-a-f]{36}|(?:NZ|DOC)-[a-z]{3}|[\\&\&#8217;'\(\)\.\-\/a-z&#257;&#275;&#299;&#333;&#363;]+))|(type=(?<q1>\'|\"|)(?:hut|track|campsite)\k<q1>)|(content=(?:alert|detail|region|all|dump|check|find|list))|(show=alert(s)?; #(?:[a-z]+,)*[a-z]+))\s*){1,4}(?:(?:(h=[12345])|(float=(?:left|right))|(clear=(?:left|right|both)))\s*){0,4}\s*:\)/i'
return: 'NZDoCnew'

NZDoCnew\NZDoC_Parse
: ak: #idtypecontent
Array
(
    [#] => Array
        (
            [0] => id
            [1] => 100043375
            [2] => type
            [3] => hut
            [4] => content
            [5] => detail
        )

    [id] => 100043375
    [type] => hut
    [content] => detail
)


: ''

parm: : 'id:"100043375" typ:"hut" cnt:"detail" ""'
parm: : 'id:"100043375" typ:"hut" cnt:"detail" ""'
doc_facilities_hut: 'https://api.doc.govt.nz/v2/huts/100043375/detail?coordinates=wgs84'
doc_facilities_alert: 'https://api.doc.govt.nz/v2/huts/100043375/alerts?coordinates=wgs84'

NZDoCnew\NZDoC_Parse
: ak: #idtypecontent
Array
(
    [#] => Array
        (
            [0] => id
            [1] => 999999999
            [2] => type
            [3] => hut
            [4] => content
            [5] => detail
        )

    [id] => 999999999
    [type] => hut
    [content] => detail
)


: ''

parm: : 'id:"999999999" typ:"hut" cnt:"detail" ""'
parm: : 'id:"999999999" typ:"hut" cnt:"detail" ""'
doc_facilities_hut: 'https://api.doc.govt.nz/v2/huts/999999999/detail?coordinates=wgs84'
cURL DoC API error: ": 'The requested URL returned error: 404 " https://api.doc.govt.nz/v2/huts/999999999/detail?coordinates=wgs84'

NZDoCnew\NZDoC_Parse
: ak: #idtypecontent
Array
(
    [#] => Array
        (
            [0] => id
            [1] => DOC-DOC
            [2] => type
            [3] => track
            [4] => content
            [5] => region
        )

    [id] => DOC-DOC
    [type] => track
    [content] => region
)


: ''

parm: : 'id:"DOC-DOC" typ:"track" cnt:"region" ""'
parm: : 'id:"DOC-DOC" typ:"track" cnt:"region" ""'
doc_facilities_track: 'https://api.doc.govt.nz/v1/tracks/region/DOC-DOC?coordinates=wgs84'
cURL DoC API error: ": 'The requested URL returned error: 400 " https://api.doc.govt.nz/v1/tracks/region/DOC-DOC?coordinates=wgs84'

NZDoCnew\NZDoC_Parse
: ak: #idtypecontent
Array
(
    [#] => Array
        (
            [0] => id
            [1] => 999999999
            [2] => type
            [3] => campsite
            [4] => content
            [5] => alert
        )

    [id] => 999999999
    [type] => campsite
    [content] => alert
)


: ''

parm: : 'id:"999999999" typ:"campsite" cnt:"alert" ""'
parm: : 'id:"999999999" typ:"campsite" cnt:"alert" ""'
doc_facilities_alert: 'https://api.doc.govt.nz/v2/campsites/999999999/alerts?coordinates=wgs84'
cURL DoC API error: ": 'The requested URL returned error: 404 " https://api.doc.govt.nz/v2/campsites/999999999/alerts?coordinates=wgs84'

tahi Page last modified on 2022 Jan 26 13:40

Edit - History - Recent Changes - WikiHelp - Search - ?Subject="KiwiWiki: NZ Do C"&Body="From KiwiWiki: NZ Do C (https://kiwiwiki [period] nz/Test/NZDoC) - Testing the Cookbook:NZDoC recipe, see [[Cookbook/NZDoC" | email page as link ]]