Tags

The Wellynews API


Word cloud by Wordle

A number of large news organisations have begun providing APIs to their content. These services allow content to be queried programmatically for use in mash ups and the like.

The Wellynews API lets you do something simular with the local newsitems indexed by Search Wellington.

For example, the API can provide a feed of local newsitems related to consultation; or maybe zebras. It can also handle potentially interesting combinations, such as what Wellington City Council has said about the Indoor Sports Centre or sculpture on the waterfront.

Getting started

Supported Formats

The API allows newsitems to be extracted in RSS or JSON (Javascript) formats. RSS is widely supported by feed readers, web browsers and server side libraries. JSON is typically used for passing data into browser based Javascript applications and mashups.

The desired format is specified by appending ethier rss or json to the end of the query url.

ie. Transport newsitems in RSS format:

or the same newsitems in JSON format:

Specifying tags and publishers

When querying for newsitems (below) you have the option of filtering by tag or publisher. Tags and publishers are specified by substituting the appropriate url snippet into your request.

ie. The url snippet for Wellington City Council is wellington-city-council.

A complete list of available tag and publisher url snippets is provided below.

Newsitem queries

The following types of newsitem query are supported.

Tag newitems

Returns newsitems tagged with a given tag.

ie. All newsitems tagged with soccer, in RSS format.

Publisher newsitems

Returns newsitems published by a specific publisher.

ie. newsitems published by the Capital Times, in JSON format.

Combinations

Returns newsitems tagged with a combination of two tags, or a publisher and a tag.

The tags are seperated with a plus character. For combinations involving a publisher, the publisher must always appear on the left hand side of the plus.

ie. newsitems tagged with transport and consultation and Wellington City Council media releases tagged with indoor sports centre.

Credit: The combination url scheme was inspired by the Guardian newspapers' tag combiners.

Commented newsitems

Returns newsitems which have been commented on.

ie. Commented newsitesm in JSON format.

Commented newsitems also specifiy the newsitems'comment feed url on the commentFeed field on the JSON results.

Commented newsitems for a tag

Returns commented newsitems for a given tag.

ie. Commented newsitems tagged with waterfront in JSON format.

Geotagged newsitems

Returns newsitems which have been geotagged.

ie. Geotagged newsitems in RSS format.

Pagination

Each RSS or JSON call returns a maximum of 30 results. For JSON calls, additional results can be obtained from using the page parameter to paginate through the results.

ie. page 6 of the Victoria University newsitems:

You can see the total number of available results in the totalItems field of the JSON results. The showingFrom and showingTo fields tell you which resuls you are currently viewing:


{
  "totalItems": 377,
  "showingFrom": 151,
  "showingTo": 180,
  "newsitems": [ ... ]
}

JSONP callbacks

You can specify that JSON results should be wrapped in a JSONP style callback, using the optional callback parameter. This is approch is required when making cross domain JSON calls from a web brower.

ie.

Your callback function name may contain letters, numbers and underscores only.

Geotagging

Where applicable, geotags are also embedded in our RSS feeds using the GeoRSS standard. A GeoRSS tagged feed item has this format:

<item>
<title>Can you replace the Hilton?</title>
<geo:lat>-41.284896</geo:lat>
<geo:long>174.778531</geo:long>
</item>

RSS to JSON feed mirroring

Provides JSON copies of local RSS feeds. This makes it easier to integrate feeds into sites using Javascript.

ie. Wellington City Councils' latest news feed as a JSON list:

A complete list of feed url snippets is provided below.

URL snippets

Available Tags
TagURL snippet
Accommodation accommodation
Animals animals
Architecture architecture
Art art
Blanket man blanket-man
Blogs blogs
Books books
Bus review bus-review
Business business
Busking busking
Cinema cinema
City Guides cityguides
Community Groups communitygroups
Conservation conservation
Earthquake strengthening earthquake-strengthening
Education education
election2011 election2011
Elections 2010 elections2010
Emergency Services emergencyservices
Events events
Fashion fashion
Featured featured
Fire ban fire-ban
Gay & Bisexual gaybisexual
Government government
Health health
Internet internet
Issues issues
Law law
Libraries libraries
Local History localhistory
Media media
Misc misc
MMA mma
Obituaries obituaries
Open data open-data
Performing Arts performingarts
Petone petone
Pies pies
Places places
Real Estate realestate
Restaurants and Bars restaurantsbars
Reviews reviews
Sausages sausages
Scraper required scraper-required
Snow snow
Sport sport
Stadium stadium
Tourism tourism
Transport transport
Tsunami tsunami
Video video
Water restrictions water-restrictions
WCN Hosted wcnhosted
Webcams webcams
Wellington wellington
Zombies zombies
Available Publishers
PublisherURL snippet
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
Available RSS to JSON Feeds
FeedURL snippet
Adam Art Gallery feed adam-art-gallery-feed
Aikido Tenshindo aikido-tenshindo
All Saints Hataitai news all-saints-hataitai-news
Amesbury Drive School feed amesbury-drive-school-feed
Aro Valley Community Council's Facebook wall aro-valley-community-councils-facebook-wall
Aro Valley Community Centre - News/Blog aro-valley-community-centre-newsblog
Auckland Trains » Wellington auckland-trains-wellington
BNU match reports bnu-match-reports
BNU news bnu-news
Back To The Future back-to-the-future
Binge Culture Collective news binge-culture-collective-news
Bluebridge news bluebridge-news
Bowls Tawa news bowls-tawa-news
Brooklyn Early Childhood Centre news brooklyn-early-childhood-centre-news
Brooklyn Residents Association news brooklyn-residents-association-news
Brooklyn School news brooklyn-school-news
Building Madness in Mt Vic feed building-madness-in-mt-vic-feed
CMHV news cmhv-news
Capital Cycling group rss feed. capital-cycling-group-rss-feed
Capital Mosaic posts capital-mosaic-posts
Capital Times news items capital-times-news-items
CataBlog Feed catablog-feed
Celia Wade-Brown news celia-wade-brown-news
CentrePort news centreport-news
Click Local feed click-local-feed
Coastguard Mana news coastguard-mana-news
Cricket Wellington news cricket-wellington-news
Crossways news crossways-news
Cycling in Wellington posts cycling-in-wellington-posts
DCM alerts archive dcm-alerts-archive
Dave Choat - Care not Cuts feed dave-choat-care-not-cuts-feed
Days Bay Residents Association news days-bay-residents-association-news
Downstage news downstage-news
Downstage theatre blog posts downstage-theatre-blog-posts
Dowse news dowse-news
East by West updates east-by-west-updates
Eastbourne Bowling Club news eastbourne-bowling-club-news
Eye of the Fish feed eye-of-the-fish-feed
Friends of Futuna Charitable Trust news friends-of-futuna-charitable-trust-news
GW Feed gw-feed
Greens - Wellington feed greens-wellington-feed
HOBM news feed hobm-news-feed
HVFPU news hvfpu-news
Harbour City Hockey club news harbour-city-hockey-club-news
Hataitai Community website posts hataitai-community-website-posts
Have You Say posts have-you-say-posts
Houghton Valley School news houghton-valley-school-news
Hutt Chick hutt-chick
Hutt City Press Releases hutt-city-press-releases
HuttNZ feed huttnz-feed
Huttcity Council meetings huttcity-council-meetings
Innermost Gardens news innermost-gardens-news
Island Bay School news island-bay-school-news
JBC news jbc-news
JJMorgan and co news jjmorgan-and-co-news
Johnsonville Cricket Club news johnsonville-cricket-club-news
Justin Lester blog justin-lester-blog
KTSC news ktsc-news
KTSC news ktsc-news
Kapiti Playhouse Inc - News kapiti-playhouse-inc-news
Karori Anglican news karori-anglican-news
Karori Baptist Church news karori-baptist-church-news
Keep Crossways posts keep-crossways-posts
Keith Johnson posts keith-johnson-posts
King's Church news kings-church-news
Kupe Canoe Club news kupe-canoe-club-news
LBSLSC news lbslsc-news
Land Search and Rescue in Wellington feed land-search-and-rescue-in-wellington-feed
Lazy Fern blog feed lazy-fern-blog-feed
Lions latest news lions-latest-news
Mark Greening posts mark-greening-posts
Metlink news metlink-news
Metlink offical news feed metlink-offical-news-feed
Moot Cook mobilised moot-cook-mobilised
Mount Vic Dojo news mount-vic-dojo-news
Mt Victoria Residents Association news mt-victoria-residents-association-news
Multicultural Services Centre of Wellington posts multicultural-services-centre-of-wellington-posts
NIWA Wellington Regional Science and Technology Fair news niwa-wellington-regional-science-and-technology-fair-news
NRA news nra-news
Newswire Wellington newswire-wellington
Newswire sport feed newswire-sport-feed
Newswire.co.nz news feed newswireconz-news-feed
Newswire.co.nz arts feed newswireconz-arts-feed
Newtown Art Project news newtown-art-project-news
Newtown Festival posts newtown-festival-posts
Ngaio Progressive Association news ngaio-progressive-association-news
North face track blog feed north-face-track-blog-feed
Olympic Harriers news feed olympic-harriers-news-feed
Oriental Bay Residents’ Association posts oriental-bay-residents-association-posts
Ories news ories-news
PNP news pnp-news
Petone Rugby Club news petone-rugby-club-news
Poneke Dojo news poneke-dojo-news
Poneke Dojo news poneke-dojo-news
Poneke Wellington feed poneke-wellington-feed
Porirua City Council Sports Grounds Status feed porirua-city-council-sports-grounds-status-feed
Pukerua Bay Soccer Club news pukerua-bay-soccer-club-news
Queen Margarets College news queen-margarets-college-news
Queen Margarets College Principals blog queen-margarets-college-principals-blog
Rainey Collions lawyers news rainey-collions-lawyers-news
Randell Cottage Writers Trust news randell-cottage-writers-trust-news
Raumati Swimming Club news raumati-swimming-club-news
Richter City Roller Derby feed richter-city-roller-derby-feed
Richter City blog feed richter-city-blog-feed
Rimutaka Incline Railway Heritage Trust news rimutaka-incline-railway-heritage-trust-news
Rugby Club Weekly Feed rugby-club-weekly-feed
SFBH news sfbh-news
SSR news ssr-news
Saints news saints-news
Salient Features Feed salient-features-feed
Salient News Feed salient-news-feed
Salient main feed salient-main-feed
Save Crossways campaign feed save-crossways-campaign-feed
Save Kapiti feed save-kapiti-feed
Scots College news scots-college-news
SeniorNet Wellington news seniornet-wellington-news
Sharon Blaikie blog sharon-blaikie-blog
Sidestrip feed sidestrip-feed
Six oclock swill feed six-oclock-swill-feed
Snapper blog snapper-blog
Spirit Taekwon-Do news spirit-taekwon-do-news
Squash Wellington news feed squash-wellington-news-feed
St James' Anglican Church news st-james-anglican-church-news
St Patricks Silverstream news feed (media rss) st-patricks-silverstream-news-feed
St Pats Silverstream news st-pats-silverstream-news
St Teresas Catholic Parish news st-teresas-catholic-parish-news
Star Boating Club news star-boating-club-news
Star Boating Club news star-boating-club-news
Stokes Valley Volunteer Fire Brigade news stokes-valley-volunteer-fire-brigade-news
Stop Out news stop-out-news
Stopout match reports stopout-match-reports
Sustainable Wellington Transport posts sustainable-wellington-transport-posts
Swim Wellington Feed swim-wellington-feed
T3 Track Blog feed t3-track-blog-feed
Table Tennis Wellington blog posts table-tennis-wellington-blog-posts
Taita Circket Club news taita-circket-club-news
Te Papa blog feed te-papa-blog-feed
Thorndon Residents Assocation blog thorndon-residents-assocation-blog
Tourism Wellington media releases tourism-wellington-media-releases
Transition Towns Brooklyn news transition-towns-brooklyn-news
Tranz Metro delays tranz-metro-delays
Tranz Metro news tranz-metro-news
Upper Hutt Hockey Club Game Reports upper-hutt-hockey-club-game-reports
VBC news vbc-news
VHF group news vhf-group-news
VUW News feed vuw-news-feed
VUWSA news vuwsa-news
Vic Library news vic-library-news
Vic Rowing news vic-rowing-news
WCBA blog feed wcba-blog-feed
WCC Watch feed wcc-watch-feed
WCL Blog feed wcl-blog-feed
WCN news wcn-news
WHF news whf-news
WHS news whs-news
WIA news wia-news
WLSAR news wlsar-news
WMC news wmc-news
WMC news wmc-news
WRC news wrc-news
WRFU Feed wrfu-feed
WRRA news wrra-news
WSAC news wsac-news
WST news wst-news
WYC news wyc-news
Waikanae Golf Club news waikanae-golf-club-news
Wakefield Hospital media releases wakefield-hospital-media-releases
Wardrobe Flair Facebook - follow the fashion! wardrobe-flair-facebook-follow-the-fashion
Watering Hole Ministries what's been happening watering-hole-ministries-whats-been-happening
Wellington Beekeepers Association news wellington-beekeepers-association-news
Wellington Beekeepers Association notices wellington-beekeepers-association-notices
Wellington City Council Latest News wellington-city-council-latest-news
Wellington Cathedral changed pages wellington-cathedral-changed-pages
Wellington City Council open consultations wellington-city-council-open-consultations
Wellington Civic Trust news wellington-civic-trust-news
Wellington Children's Hospital news wellington-childrens-hospital-news
Wellington Circus Trust news wellington-circus-trust-news
Wellington Floorball news wellington-floorball-news
Wellington Greens news wellington-greens-news
Wellington Heritage Multiple Unit Preservation Trust news wellington-heritage-multiple-unit-preservation-trust-news
Wellington Inner-City Residents and Business Association posts wellington-inner-city-residents-and-business-association-posts
Wellington Jewish Community Centre news wellington-jewish-community-centre-news
Wellington Jewish Community Centre news wellington-jewish-community-centre-news
Wellington Live Music Blog feed wellington-live-music-blog-feed
Wellington Police news wellington-police-news
Wellington Rugby Referees Associaton news feed wellington-rugby-referees-associaton-news-feed
Wellington Region Cycleways wellington-region-cycleways
Wellington Scoop features wellington-scoop-features
Wellington Samaritans's blog wellington-samaritanss-blog
Wellington Tri news wellington-tri-news
Wellington Tennis Club news wellington-tennis-club-news
Wellington Xiamen Association news wellington-xiamen-association-news
Wellington Zoo News wellington-zoo-news
Wellingtonista Blog Feed wellingtonista-blog-feed
Wellurban Feed wellurban-feed
Wesley Community Action news wesley-community-action-news
Wests rugby news wests-rugby-news
Wgtn U-13 Hatch Cup Team 2009 news wgtn-u-13-hatch-cup-team-2009-news
Whitireia Community Polytechnic news whitireia-community-polytechnic-news
Whitireia Community Polytechnic News Feed whitireia-community-polytechnic-news-feed
Zephyr Rovers FC zephyr-rovers-fc
drama* on the waterfront posts drama-on-the-waterfront-posts
prednisone online prednisone-online
prednisone sale prednisone-sale
strathmorepark posts strathmorepark-posts

Usage Example

Example: Using JSON and Javascript to pull the latest transport newsitems into a page.

Transport

Source code

The Javascript source code for the above example is available below.

This example was implemented using the JQuery Javascript library. Any other JSON library could be used.

Following, is a line by line breakdown of what the example is doing:

Lines 1-2: HTML for the Transport heading and an emptry div tag which JQuery will write the newsitems into.

Line 4: Sourcing in the JQuery library file; you would normally do the in the head tag.

Lines 6-8: JQuery. Once the page has finished loading and is ready, fetch JSON data from the API and pass it to the function renderNewsitems.

Lines 10-16: JQuery. The renderNewsitems function is using JQuery to write out the first 4 items from the JSON data as HTML into the empty newsitems div.

Contact

Doing something interesting with this?

Contact enquires (at) wellington.gen.nz and let us know.