Code samples and libraries
Javascript
Search widget - DigitalNZ
In-context search of content in DigitalNZ that can be embedded in web pages and blogs etc.
Search widget example (see Coming Home search box in right-hand column)
JSON query - Joe Mahoney
Simple example that shows "sports related" cartoons from DigitalNZ. Loads the Google Ajax API code; imports the jQuery javascript framework; uses jQuery to make an api call to DigitalNZ - see the function get_page_of_cartoons(); when the api returns the json data it updates the text and shows four thumbnail images of related cartoons.
JSON query example (view source for javascript code)
Timeline demo - DigitalNZ
Implementation of Timeline app from MIT's Simile project (Javascript + Ruby)
Source code for DigitalNZ timeline
Timeline documentation from MIT
Perl
DigitalNZ image distribution - Gordon Paynter
Application that shows the distribution of images in DigitalNZ over time.
DigitalNZ image distribution web page
Source code for DigitalNZ image distribution
PHP
Drupal module
Module to integrate DigitalNZ search with Drupal CMS.
Source code for DigitalNZ Drupal module - Jonathan Hunt
Moodle search block - François Marier
Plugin to allow teachers to provide their students with an easy way of using the DigitalNZ search engine from within a Moodle course page.
Source code for Moodle Search Block
Moodle embedded resource - François Marier
Plugin to allow teachers to provide their students with links to resources indexed by DigitalNZ.
Moodle embedded resource web page
Source code for Moodle embedded resource
Python
Python module - Mark Matienzo
A Python module to interact with the DigitalNZ API. Shorthand way to make requests that then grabs JSON responses and translates to a Python object.
Ruby
Ruby Gem for DigitalNZ - James Harton
Note that some componenets such as the DigitalNZ record lookup and date were not added.
DigitalNZ client library for Ruby - Boost
This library uses nokogiri for speedily parsing the XML.
Kete's External Search Sources - Kete/Katipo/Auckland City Library
Source code for Kete External Search Sources
Geoparsing DigitalNZ - Gordon Anderson
