SEVEN THINGS YOU CAN DO TO LEAD A GREENER LIFE
  • Walk_the_walk_off
  • Stay_grounded_off
  • All_consuming_off
  • Easy_on_the_meat_off
  • Human_heat_off
  • Plug_out_off
  • Stick_with_what_you_got_off
Home > Green Thing Labs > Content Api >

Green Thing Labs

Content API

Content item details

Each content item can be fetched in an XML format. An example is shown below:

URL: http://v2.dothegreenthing.com/content/{content_item_name}.xml

Method: GET

Example: http://v2.dothegreenthing.com/content/mr_glovey_all_consumes_his_jam.xml

      <content href="http://v2.dothegreenthing.com/content/gusty_and_ford">
        <id>1</id>
        <title>Gusty And Ford</title>
        <author>Steven Qua</author>
        <credits>
          This film is about the way you see more when you walk - in this case, the way you look at road signs. I didn't drive anywhere to shoot any of these road signs. Most of them I walked to and one of them was in Norway and turned out to be quite a long walk especially carrying a camera. I didn't do it all, the music is by Marc Folan and the voiceover is Paul Berczeller. If you like the video then why don't you take some shots of some road signs, make your own one and upload it.
        </credits>
        <thumbnail>
          http://v2.dothegreenthing.com/content_items/0000/0001/gusty_and_ford.jpg
        </thumbnail>
        <num_views>3229</num_views>
        <num_likes>8</num_likes>
        <liked>false</liked>
        <reported>false</reported>
        <num_comments>2</num_comments>
        <created_at>2007-10-03T14:46:00Z</created_at>
        <updated_at>2008-11-14T15:14:24Z</updated_at>
        <action href="http://v2.dothegreenthing.com/actions/walk_the_walk">Walk The Walk</action>
        <media href="http://s3.amazonaws.com/panda-test/96.flv">
          <embed src="http://s3.amazonaws.com/panda-test/player.swf" width="515" height="300" 
             allowfullscreen="true" allowscriptaccess="always" 
            flashvars="&displayheight=300&file=http://s3.amazonaws.com/panda-test/96.flv&width=400&height=300" />
        </media>
        <video_files>
          <file href="http://s3.amazonaws.com/panda-test/96.flv" format="flv"/>
        </video_files>
      </content>
    

If the story includes embedded media (video, photo, audio, flash, etc), the canonical location of that media is included in the href attribute of the media tag, and the code required to embed it in an HTML document is included inside the tag.

If the story media content includes video which is available in different formats, those formats and file locations are listed in the video_files tag. This will be the case for videos which are not hosted on external sites, but are instead hosted by Green Thing.

All content

A list of content items is available in XML format. An example is shown below:

URL: http://v2.dothegreenthing.com/content.xml

Method: GET

      <content count="52">
        <item href="http://www.dothegreenthing.com/content/mr_glovey_all_consumes_his_jam">Mister Glovey All Consumes His Jam</item>
        <item href="http://www.dothegreenthing.com/content/to_the_end_of_the_pencil_and_the_edge_of_the_page">To The End Of The Pencil And The Edge Of The Page</item>
        <item href="http://www.dothegreenthing.com/content/the_pencil_picture">An All-Consuming illustration</item>
        ... etc
      </content>
    

This list is ordered by the creation date of the content, so latest content appears at the top.

There is also an Atom a feed for all the latest content posted to the site:

URL: http://v2.dothegreenthing.com/content.atom

Method: GET

There are various parameters that can be applied to change the ordering and filtering of both of these views:

Parameter Description Example
a Show only stories tagged to a particular action. The value should be the stub for the requested action.r http://v2.dothegreenthing.com/stories.atom?a=walk_the_walk

This feed includes includes RFC 5005 pagination links.

Comments

For each individual content item, an Atom feed is available containing the comments posted on that item.

URL: http://v2.dothegreenthing.com/content/{content_item_name}.atom

Method: GET

Example: http://v2.dothegreenthing.com/content/mr_glovey_all_consumes_his_jam.atom

Latest from the Green Thing Blog:
Be a dear and put on a sweater | When you are feeling cold and are reaching to turn on the heating take a minute and call...