Documentation

stream

  • http://services.digg.com/2.0/stream

Description

  • The Digg Streaming API makes it possible for both browsers and external servers to receive a full steam of submissions, comments and Diggs which occur on Digg.com or via our other APIs. It is possible to receive only a subset of submissions, comments or Diggs by specifying a comma-separated list of the values "submission", "digg" and "comment" for the URI parameter "types". For external server connections, it is recommended to use the "event-stream" or "json" response formats by specifying the "format" URI parameter.

    Browsers which do support the event-stream protocol (generally restricted to recent versions, and not trivial due to cross-domain issues) may use the "event-stream" response format as well, but will likely find it easier to use the "javascript" response type along with specifying the "callback"URI parameter, which will make the response in JSON-P format, and will return immediately after the first appropriate event is streamed. (It may help to think of this as long-polling implemented via JSON-P.)

    All response types except "javascript" may specify the "return_after" parameter, which defines the maximum number of messages to receive before the server closes the connection to the client. The value of "return_after" is always 1 if the response_type is "javascript".

HTTP Method

  • GET

Examples

{"buries": 0, "comment_id": "20101029161457:ea6c045e756345f7afdbfe8911f73624", "text": "can't believe photo-bombing existed before facebook", "diggs": 0, "item": {"status": "top", "container": {"name": "World News", "short_name": "world_news"}, "description": "In the steady barrage of images that make up the digital age, it's almost impossible to fathom a time when photographs of people were nonexistent. But rest assured, kids, that such a time did exist -- and it really wasn't that long ago in the grand scheme of things.\nSo the recent discovery of what appears to be two men near the river's edge in a photo of Cincinnati taken in 1848 is kind of a big deal among photography historians.\nAs reported by NPR's Robert Krulwich last month, the photo was taken by Charles Fontayne and William Porter -- who were standing on the other side of the Ohio River -- on Sunday, September 24th, 1848, 162 years prior to Krulwich's post about it. The photo is what's known as a daguerreotype -- an image developed via an early photographic process developed in France. When zooming in on the photo, Krulwich noticed what appeared to be two human figures. You can see them in a close-up image below:", "title": "Very early photographic images of humans discovered", "submit_date": 1288223121, "media": 0, "diggs": 252, "comments": 25, "thumbnail": {"src": "http://cdn1.diggstatic.com/story/very_early_photographic_images_of_humans_discovered/t.png", "contentType": "image/png", "originalheight": 300, "height": 62, "width": 62, "originalwidth": 300}, "topic": {"name": "World News", "short_name": "world_news"}, "shorturl": {"short_url": "http://digg.com/news/worldnews/very_early_photographic_images_of_humans_discovered", "view_count": 0}, "promote_date": 1288291831, "link": "http://news.yahoo.com/s/yblog_upshot/20101027/od_yblog_upshot/very-early-photographic-images-of-humans-discovered", "href": "http://digg.com/news/worldnews/very_early_photographic_images_of_humans_discovered", "id": "20101027234521:9796cb90-99a3-406a-a65e-abc7900de4f4"}, "user": {"name": "omeezy4sheezy", "links": [], "registered": 1230746213, "profileviews": 0, "fullname": "hey man, does this method you put for Canadians to watch also work for other american-only sites as well?", "icon": "http://cdn1.diggstatic.com/user/4404464/l.3275134689.png"}, "date_created": 1288368897, "type": "comment"}
{"item": {"status": "upcoming", "container": {"name": "Business", "short_name": "business"}, "description": "QUE RESTE-T-IL DE NOS VOYAGES ? - Le Blog Officiel de Michel Bellin", "title": "QUE RESTE-T-IL DE NOS VOYAGES ? - Le Blog Officiel de Michel Bellin", "submit_date": "1288368902", "media": "0", "diggs": null, "comments": null, "thumbnail": {"src": "http://cdn2.diggstatic.com/story/que_reste_t_il_de_nos_voyages_le_blog_officiel_de_michel_bellin/t.png", "contentType": "image/png", "originalheight": 300, "height": 62, "width": 62, "originalwidth": 300}, "topic": {"name": "Business", "short_name": "business"}, "shorturl": {"short_url": "http://digg.com/news/business/que_reste_t_il_de_nos_voyages_le_blog_officiel_de_michel_bellin", "view_count": 0}, "promote_date": null, "link": "http://onlywire.com/r/13950891", "href": "http://digg.com/news/business/que_reste_t_il_de_nos_voyages_le_blog_officiel_de_michel_bellin", "id": "20101029161502:cd1c3f22-b30e-4426-a428-a4f3bc30541f"}, "type": "submission", "user": {"name": "markmartinez", "links": [], "registered": 1263061711, "profileviews": 0, "fullname": "", "icon": "http://cdn2.diggstatic.com/img/user/l.png"}}
{"date": 1288368902, "item": {"status": "upcoming", "container": {"name": "Business", "short_name": "business"}, "description": "QUE RESTE-T-IL DE NOS VOYAGES ? - Le Blog Officiel de Michel Bellin", "title": "QUE RESTE-T-IL DE NOS VOYAGES ? - Le Blog Officiel de Michel Bellin", "submit_date": 1288368902, "media": 0, "diggs": 1, "comments": 0, "thumbnail": {"src": "http://cdn1.diggstatic.com/story/que_reste_t_il_de_nos_voyages_le_blog_officiel_de_michel_bellin/t.png", "contentType": "image/png", "originalheight": 300, "height": 62, "width": 62, "originalwidth": 300}, "topic": {"name": "Business", "short_name": "business"}, "shorturl": {"short_url": "http://digg.com/news/business/que_reste_t_il_de_nos_voyages_le_blog_officiel_de_michel_bellin", "view_count": 0}, "promote_date": null, "link": "http://onlywire.com/r/13950891", "href": "http://digg.com/news/business/que_reste_t_il_de_nos_voyages_le_blog_officiel_de_michel_bellin", "id": "20101029161502:cd1c3f22-b30e-4426-a428-a4f3bc30541f"}, "type": "digg", "user": {"name": "markmartinez", "links": [], "registered": 1263061711, "profileviews": 0, "fullname": "", "icon": "http://cdn2.diggstatic.com/img/user/l.png"}, "digg_id": "20101029161502:c91fc87c-5c1c-485f-83c6-771f24a8fa90"}
{"date": 1288368903, "item": {"status": "upcoming", "container": {"name": "Science", "short_name": "science"}, "description": "Dracula, Frankenstein, witches, ghosts and goblins are all around us at this time of year -- and Hollywood keeps them at our beck and call for the rest of the year as well. Scary movies allow us to experience the tonic of a good fright whenever we want one, but why do people seek out that experience?", "title": "Why we love to scare ourselves; the anatomy of fright", "submit_date": 1288368338, "media": 0, "diggs": 9, "comments": 0, "thumbnail": {"src": "http://cdn2.diggstatic.com/story/why_we_love_to_scare_ourselves_the_anatomy_of_fright/t.png", "contentType": "image/png", "originalheight": 300, "height": 62, "width": 62, "originalwidth": 300}, "topic": {"name": "Science", "short_name": "science"}, "shorturl": {"short_url": "http://digg.com/news/science/why_we_love_to_scare_ourselves_the_anatomy_of_fright", "view_count": 0}, "promote_date": null, "link": "http://www.physorg.com/news/2010-10-halloween-special-anatomy-fright.html", "href": "http://digg.com/news/science/why_we_love_to_scare_ourselves_the_anatomy_of_fright", "id": "20101029160538:889220fd-b947-4447-9273-cd2f9cae2293"}, "type": "digg", "user": {"name": "swansontom", "links": [], "registered": 1238797612, "profileviews": 0, "fullname": "Tommy Swanson", "icon": "http://cdn3.diggstatic.com/user/5015134/l.png"}, "digg_id": "20101029161503:0763d682-0911-4639-8c01-25b45e5e1851"}
{"item": {"status": "upcoming", "container": {"name": "Lifestyle", "short_name": "lifestyle"}, "description": "I know there have been quite a large number of Astro Gaming fans that have been interested in a wireless headset solution. Today, Astro announced the new wireless Astro Mixamp and the A* In-ear headset. You can bet Ill get  Continue reading ", "title": "Astro Gamings New Wireless Mixamp 5.8 Mixamp and A* In-Ear Headset Announced", "submit_date": "1288368902", "media": "0", "diggs": "1", "comments": "0", "thumbnail": {"src": "http://cdn1.diggstatic.com/story/astro_gamings_new_wireless_mixamp_5_8_mixamp_and_a_in_ear_headset_announced/t.png", "contentType": "image/png", "originalheight": 300, "height": 62, "width": 62, "originalwidth": 300}, "topic": {"name": "Lifestyle", "short_name": "lifestyle"}, "shorturl": {"short_url": "http://digg.com/news/lifestyle/astro_gamings_new_wireless_mixamp_5_8_mixamp_and_a_in_ear_headset_announced", "view_count": 0}, "promote_date": null, "link": "http://reflectzyn.com/gagdets/2010/10/29/astro-gamings-new-wireless-mixamp-5-8-mixamp-and-a-in-ear-headset-announced/", "href": "http://digg.com/news/lifestyle/astro_gamings_new_wireless_mixamp_5_8_mixamp_and_a_in_ear_headset_announced", "id": "20101029161503:fabd91cd-89aa-43e7-b406-6d79b7ef0f28"}, "type": "submission", "user": {"name": "arctyc", "links": [], "registered": 1269730804, "profileviews": 0, "fullname": "Kendall Smith", "icon": "http://cdn3.diggstatic.com/user/6927793/l.1513533721.png"}}