Recreating Google’s NewsShow using Bing
I’ve been looking at and learning the Bing 2.0’s API recently, and comparing it to Google’s API. While browsing Google’s AJAX Search API I noticed that Google is focusing on letting their users embed simple apps/controls that take advantage of their search API which provide a lot of value for minimal time invested. I tried to find a similar offering from Bing but came up empty. That’s a pretty smart tactic because if I were an end user (read: not a power user) deciding to leverage an API for my site I would lean heavily toward Google because the barrier to entry is just a few lines of JavaScript. One of Google’s apps that I really liked was the NewsShow which lets users see rotating headlines and previews of Google News Search based on queries that you select. In an attempt to become familiar with the Bing 2.0 API and drink the MS Kool-Aid I decided to recreate that functionality using Bing as the search provider.
Google’s NewsShow
Alnur’s Some What Ghetto NewsShow Using Bing
I’ve copied the code into this blog post since it’s just JavaScript so what you’re, hopefully, seeing below is the actual control running. The code is straight forward: a loop that grabs news head lines for a specific topic, shows the first 4, and then repeats for the next topic.
Toronto Star
FORT COLLINS, COLO. – The Larimer County sheriff's department in Colorado says they have no indication a family was carrying out a hoax when they reported their 6-year-old son was in a helium balloon that floated away from their home. The boy was found hiding in the home's garage Thursday ...
The Ghetto NewsShow in full flight
Feel free to SAM (steal and modify) but if you end up using/improving it let me know!