Just another Nodetraveller

UK TV Listings via XMLRPC

The UK TV Guide for Mambo component is basically a XML RPC client thats talks to the XML RPC server here at nodetraveller.com and renders the data it gets back in a nice way. The component has been released for a few weeks now and I’ve actually been using the service for a long time before that too so its probably a good time to let people know how to access it….

Because the UK TV Listings webservice is implemented using XML RPC it means anyone can access it via a XML RPC client. XMLRPC is the technology on which SOAP is based on. This page shows all the available implementations (servers and clients) using several different technologies so if you haven’t dabbled with this kind of thing before, thats a good page to start..

Before we gone on, I’d like to say thanks because service uses the wonderful data provided by Andrew Flegg over at www.bleb.org, without which I’d have no fun working on this project and I’d probably be working on something quite boring…

Anyway, if you want to use it, you’re gonna need to know what it takes and what it gives…

The URI is :** http://www.nodetraveller.com/webservices/tvGuide/tvGuideRPCService.php**

Methods :

ukTvGuide.nodetraveller.com.getChannels(String date)

  • Returns an array of strings, each of which is a name of a channel, for the specified date. The date format is as always dd/MM/YYYY eg . Xmas day is 25/12/2004.

ukTvGuide.nodetraveller.com.getCategories() – Returns an array of strings, each of which is a name of a category

ukTvGuide.nodetraveller.com.getChannelListingsByCategory(String category,String date, String timeslot, Int time) – The category parameter should be a value returned by getCategories. Returns an array for each channel requested. Each element within the array represents a listing. The actual structure is shown below.

ukTvGuide.nodetraveller.com.getChannelListings(Array channels,String date, String timeslot, Int time) – The channels array that is passed should be an array of Strings, each of which is a value returned by getChannels. Returns an array for each channel requested. Each element within the array represents a listing. The actual structure is shown below.

The valid timeslot values are as follows: MORN, AFTER, EVEN, LATE AND WHATSONNOW. Each timeslot, except for WHATSONNOW, represents a 6 hour timeslot; MORN – 6am – noon, AFTER – noon – 6pm, EVEN – 6pm – midnight and LATE – midnight – 6am.

The WHATSONNOW value specifies that only the programme that is currently showing should be returned.

The time parameter should pass the time in 24 hour format. If the WHATSONNOW value is not used, then the time parameter is ignored.

TV Listing structure

The service returns an array of channels and for each channel requested, there are an array of listings within.

The structure of each listing is as follows :

channel – String – channel name date – String – date format dd/mm/YYYY title – String the title of the programme description – String – the description of the programme subtitle – String – the subtitle, if any type – String – some programmes are classified eg Film, Childrens start – String – start time end – String- end time imgUrl – String – the url for the channel img

And that’s it. You can see the actual RPC messages here.

If you do make use of it, please let me know as I’d like to know if its been used and how. Some of the projects that I’d like to see would be a flash client to replace my soap version and an XUL based client for Mozilla (please!). A version for mobile phones would be great too. If I had the time I’d start work on these myself because 1) I always like to try new tech and 2) I find experimenting with different UIs fun.

RSS Options in Mambo

I was a bit disappointed with the standard rss feature in Mambo as it only supports rss 0.91. Suprisingly, there wasn’t a component available that outputs the content in any of the other formats so I thought I’d give it a go. No point in reinventing the wheel so I made use of an excellent class called FeedCreator. It can output in RSS 0.91, 1.0 and 2.0 as well as OPML and ATOM 0.3.

Also supplied is a module that will display the links. The actual links are configurable, in that you can specify what formats your feeds are in (Take a look on the right). Also you can add custom links and images with the module eg the mamboserver.com link is a custom one.

You can download it at mamboforge or from the my downloads section

[Update]I’ve released a beta version of RSSXT 2. New features include remote blogging and pinging of aggregator sites. You can download it at the mamboforge site

UK TV Guide Component

I’ve just completed a component for Mambo. As you can probably guess by the name, it retreives and displays the TV and Radio listings for the UK. At the moment, there is a choice of over 60 channels and two ways of displaying the listings; columns and timeline.

I spent a bit more time on the UI than normal but finally I’m pleased with it. It works using XML RPC, connecting to my service and then displaying the listings. I hope to post more about the XML RPC service soon but I need to finish off a project before I do…

Anyway, click the link in the menu and take a look. You can also download the component here from this site or from mamboforge.