
Wish List
Tags
adobe air ajax apple cf community cfml coldfusion examples ext flash flex google javascript max2007 max2008 misc open source programming railo software technology ui
Recent Entries
The Pirate Bay Sold!
Railo Documentation
iPhone Navi Software Now Available!
iPhone OS3 Cracked!
Search
RSS
Subscribe
Blogroll
An Architect's View
Ben Forta
CFSilence
Coldfusion Jedi
Rey Bango
TalkingTree
Feedburner Management CFC Update
On Monday I wrote up quick CFC that wrapped the functionality of the Feedburner Management API. I wasn't quite happy with the amount of work required to add the services and parameters so I added a helper function which makes the process a heck of a lot easier.
I also found a few little bugs and added some additional comments to help with understanding the code (though in my opinion there isn't too much complexity).
Before adding the helper function you added a service with parameters like this:
<cfset services = arrayNew(1)>
<cfset servicesStruct= structNew()>
<cfset servicesStruct.class="BrowserFriendly">
<cfset servicesStruct.params = arrayNew(1)>
<cfset servicesStruct.params[1]=structNew()>
<cfset servicesStruct.params[1].paramname='forceLandingPage'>
<cfset servicesStruct.params[1].paramvalue='true'>
<cfset t = arrayAppend(services,servicesstruct)>
<cfset addAfeed =myFeedobj.addFeed('garyrgilbert2','testfeed','http://www.garyrgilbert.com/blog/rss.cfm?mode=full',services)>
With the addition of the helper function you add services this way:
<cfset params=['forcedlandingpage=true']>
<cfset service=myFeedObj.addservice('BrowserFriendly',params)>
<cfset addAfeed =myFeedobj.addFeed('garyrgilbert2','testfeed','http://www.garyrgilbert.com/blog/rss.cfm?mode=full')>
We use the Array shorthand for the parameters using name/value pairs. If you wanted to add a service with more than one parameter it would simply be like:
<cfset params=['commercial=no','modifications=sa']>
<cfset service=myFeedObj.addservice('CreativeCommons',params)>
The full list of services and parameters can be found on the Feedburner Management API Reference page (about half way down).
If you have any questions or find any additional bugs please let me know.


There are no comments for this entry.
[Add Comment]