Particls Subscription Plugins

If you visit the subscription helper, you'll now see an extra tab - "LinkedIn". This tab has two fields... and neither are URLs! If you enter your username and password (assuming, of course, that you have a LinkedIn account), then you'll be presented with a number of feeds representing LinkedIn data Particls can now track for you.

 

Anyone can plug in a new web service now! Examining the "SubscriptionPlugins" directory inside your Particls install folder, you'll find a file called "linkedin.xml". Opening it up will reveal some xml, and some xslt.

 

 

I think at this point, a bit more background is required: www.dapper.net provides a really cool service. They allow you to generate an API from any page. This can be outputted as XML, RSS, or any of about another million formats. It makes non-RSS websites accessible to applications like Particls. The unfortunate part about Dapper from Particls' point of view has always been that the URLs to subscribe to these sorts of services were complicated. This is where the Subscription Plugins come in.

 

 

A Subscription Plugin allows you to define a series of parameters (like a username and password), and then a number of possible "feed" urls that can be generated based on these parameters. Just in case your service doesn't support RSS, and you can only retrieve XML output, the ability to specify an XSLT that can transform the data into a feed that is understood by Particls (RSS or ATOM).

 

 

Back to the LinkedIn example. The header of the document looks like:

 

  <touchstone-subscription-plugin
    unique-id="LinkedIn"
    name="LinkedIn"
    description="Receive Linkedin Updates via Touchstone">
  <variable key="username" name="Linkedin Email" type="string"/>
  <variable key="password" name="Linkedin Password" type="password"/>
 

This defines a unique id for the plugin (for use by Touchstone to make sure we ca

n pass data back to your plugin), a name for the plugin (to appear in the subscription helper) and a description. The variables define the fields that the user needs to fill in. Currently, we support variable types of "string" and "password".

 

 

Next up, we have a bunch of sections that start with:

 

 

  <feed id="network" url="http://www.dappit.com/RunDapp?dappName=LinkedInNetworkUpdates&amp;v=1&amp;username=${username}&amp;password=${password}">
 

This defines a feed that is available based on the variables. Values entered by the user are substituted into ${variable_name} positions.

 

 

I won't go into the XSLT section here - the Web is a big place, and contains many sites much more qualified XSLT than me. Have a look in at the linkedin.xml file for an example showing how to get started.

 

 

I hope you enjoy this feature, and I look forward to seeing what people come up with.


Page Information

  • 1 year ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information


Update to PBwiki 2.0

An entirely new PBwiki experience, including folders and easier editing.

Convert Now for Free | Learn more