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 earthquake
Earthquake strengthening earthquake-strengthening
Education education
Election 2013 candidates election-2013-candidates
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
liquor licensing liquor-licensing
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
storm storm
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
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$publisher.name $publisher.urlWords
$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
Aikido Tenshindo /feed/aikido-tenshindo
Architecture Centre news /feed/architecture-centre-news
Athletics Wellington news /feed/athletics-wellington-news
Auckland Trains » Wellington /feed/auckland-trains-wellington
Binge Culture Collective news /feed/binge-culture-collective-news
Brooklyn Early Childhood Centre news /feed/brooklyn-early-childhood-centre-news
Brooklyn Residents Association news /feed/brooklyn-residents-association-news
Brooklyn School news /feed/brooklyn-school-news
CPL news /feed/cpl-news
Capital Mosaic posts /feed/capital-mosaic-posts
CataBlog Feed /feed/catablog-feed
Click Local feed /feed/click-local-feed
Community Law Wellington and Hutt Valley /feed/community-law-wellington-and-hutt-valley
Cricket Wellington /feed/cricket-wellington
Cricket Wellington news /feed/cricket-wellington-news
Downstage news /feed/downstage-news
Drama Christi news /feed/drama-christi-news
East by West updates /feed/east-by-west-updates
HOBM news feed /feed/hobm-news-feed
Harbour City Hockey club news /feed/harbour-city-hockey-club-news
Houghton Valley School news /feed/houghton-valley-school-news
Hutt City Press Releases /feed/hutt-city-press-releases
HuttNZ feed /feed/huttnz-feed
JVL Line alerts /feed/jvl-line-alerts
John Morrison feed /feed/john-morrison-feed
Johnsonville Cricket Club news /feed/johnsonville-cricket-club-news
Kapiti Aero Club news /feed/kapiti-aero-club-news
Kapiti Cycling Club news /feed/kapiti-cycling-club-news
Karori Baptist Church news /feed/karori-baptist-church-news
Keep Crossways posts /feed/keep-crossways-posts
Land Search and Rescue in Wellington feed /feed/land-search-and-rescue-in-wellington-feed
MK news /feed/mk-news
Mark Greening posts /feed/mark-greening-posts
Metropolitan Cathedral of the Sacred Heart posts /feed/metropolitan-cathedral-of-the-sacred-heart-posts
Mount Vic Dojo news /feed/mount-vic-dojo-news
Multicultural Services Centre of Wellington posts /feed/multicultural-services-centre-of-wellington-posts
Muritai School principals blog /feed/muritai-school-principals-blog
Naenae Boxing Academy posts /feed/naenae-boxing-academy-posts
Newtown Festival posts /feed/newtown-festival-posts
Olympic Harriers news feed /feed/olympic-harriers-news-feed
Oriental Bay Residents’ Association posts /feed/oriental-bay-residents-association-posts
Ories news /feed/ories-news
Petone Rugby Club news /feed/petone-rugby-club-news
Petone Rugby club match reports /feed/petone-rugby-club-match-reports
Petone Sportsville posts /feed/petone-sportsville-posts
Poneke Dojo news /feed/poneke-dojo-news
Porirua Chamber of Commerce news /feed/porirua-chamber-of-commerce-news
Porirua City Council Sports Grounds Status feed /feed/porirua-city-council-sports-grounds-status-feed
Porirua Fire Brigade news /feed/porirua-fire-brigade-news
Pukerua Bay Soccer Club news /feed/pukerua-bay-soccer-club-news
Queen Margarets College Principals blog /feed/queen-margarets-college-principals-blog
Rainey Collions lawyers news /feed/rainey-collions-lawyers-news
Raumati Swimming Club news /feed/raumati-swimming-club-news
Rugby Club Weekly Feed /feed/rugby-club-weekly-feed
Saints news /feed/saints-news
Salient Features Feed /feed/salient-features-feed
Salient News Feed /feed/salient-news-feed
Salient main feed /feed/salient-main-feed
Save Crossways campaign feed /feed/save-crossways-campaign-feed
Sharon Blaikie blog /feed/sharon-blaikie-blog
Spirit Taekwon-Do news /feed/spirit-taekwon-do-news
Squash Wellington news /feed/squash-wellington-news
Squash Wellington news feed /feed/squash-wellington-news-feed
St Teresas Catholic Parish news /feed/st-teresas-catholic-parish-news
Stokes Valley Volunteer Fire Brigade news /feed/stokes-valley-volunteer-fire-brigade-news
Swim Wellington Feed /feed/swim-wellington-feed
Te Papa blog feed /feed/te-papa-blog-feed
Tranz Metro delays /feed/tranz-metro-delays
Tranz Metro news /feed/tranz-metro-news
Upper Hutt Hockey Club Game Reports /feed/upper-hutt-hockey-club-game-reports
VUW News feed /feed/vuw-news-feed
WCBA blog feed /feed/wcba-blog-feed
WCN news /feed/wcn-news
WECC media releases /feed/wecc-media-releases
WFA news /feed/wfa-news
WHF news /feed/whf-news
WIA news /feed/wia-news
WIAL press releases /feed/wial-press-releases
WLSAR news /feed/wlsar-news
WMC news /feed/wmc-news
WMC news /feed/wmc-news
WRRA news /feed/wrra-news
WSAC news /feed/wsac-news
WST news /feed/wst-news
Waikanae Golf Club news /feed/waikanae-golf-club-news
Wakefield Hospital media releases /feed/wakefield-hospital-media-releases
Watering Hole Ministries what's been happening /feed/watering-hole-ministries-whats-been-happening
Wellington Cathedral news /feed/wellington-cathedral-news
Wellington Children's Hospital news /feed/wellington-childrens-hospital-news
Wellington City Council - Public Input /feed/wellington-city-council-public-input
Wellington City Council Latest News /feed/wellington-city-council-latest-news
Wellington City Council current e-Petitions /feed/wellington-city-council-current-e-petitions
Wellington City Council open consultations /feed/wellington-city-council-open-consultations
Wellington Civic Trust news /feed/wellington-civic-trust-news
Wellington Girls' College news /feed/wellington-girls-college-news
Wellington Jewish Community Centre news /feed/wellington-jewish-community-centre-news
Wellington Jewish Community Centre news /feed/wellington-jewish-community-centre-news
Wellington Live Music Blog feed /feed/wellington-live-music-blog-feed
Wellington Medical Research Foundation news /feed/wellington-medical-research-foundation-news
Wellington Rugby Referees Associaton news feed /feed/wellington-rugby-referees-associaton-news-feed
Wellington Scoop features /feed/wellington-scoop-features
Wellington Scottish Athletics news /feed/wellington-scottish-athletics-news
Wellington Tri news /feed/wellington-tri-news
Wellington Xiamen Association news /feed/wellington-xiamen-association-news
Wellington Zoo News /feed/wellington-zoo-news
Wellington on a plate blog /feed/wellington-on-a-plate-blog
Whitireia Community Polytechnic news /feed/whitireia-community-polytechnic-news

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.



$site_information.trackingCode