Jeff Barr's Blog

Things I Like..

Web Services Extension

The Syndic8 Web Services Interface has been around since the end of 2001. Since that time, I have added function after function to the interface, some based on my own needs and goals, and others based on what other people have asked me to do.

Based on a request from a Syndic8 user, the I made an addition to the GetFeedInfo, GetChangedFeeds, and QueryFeeds functions. Each of these feeds accepts an optional list of fields to return. For example, the following pseudo-call returns the feedid, status, and dataurl fields of feed 100:

syndic8.GetFeedInfo(100, array('feedid', 'dataurl', 'status'));

This function also accepts some pseudo-fields, Locations and Categories. The Locations field returns any known meta-data about the physical location of the feed, and the Categories field returns any known information about the categories of the feed.

I added a third pseudo-field, PollStatus. This field returns the information shown in the Poll Results tab of each Feed Info page. The data is returned as an array of structures; each structure contains the following elements:

  • date_polled
  • status
  • parse_error
  • parse_line
  • fetch_error
  • response_time
  • redirection
  • http_response
  • encoding

The array will have one element for each Syndic8 poll. Most feeds are polled twice a day; all polls are kept around for three weeks. So this array could contain up to 42 elements (subject to change, of course).

I am always interested in suggestions for new calls; simply send me an email or drop a note to the mailing list.