DEMAND ACCOUNTABILITY - The following is an easy to install and configure set of MindTouch extensions and a tutorial replete with examples that demonstrate how you can use MindTouch with the Sunlight Foundation's Sunlight Labs and Capitol Words APIs. extensions with MindTouch. Why does this matter? Now it does not take programming skills to create sophisticated reports on our legislators. Now it's very easy to mashup and remix data from Sunlight Foundation with hundreds of MindTouch pre-packaged web services from Google, Microsoft, Yahoo!, Amazon as well as tens of thousands of widgets from dozens of providers. In short, with MindTouch and these new extensions pretty much anyone can shine powerful cleansing rays of sunlight into the legislative process <teehee, excuse the cheesy pun>. And of course, you can do this even with the free and open MindTouch core; so, download now and get cracking!
Installing the Extensions
Installing the XML extensions into your MindTouch environment takes seconds (alternatively, if you'd like to try the extensions right now, feel free to register here at our Developer Site and give them a go).
First, download the XML extension files:
Next, upload the files to your own MindTouch installation. In the Control Panel, click on Extensions, and click on the Add Script link. Use either Sunlight Labs or Capitol Words as the name. For the manifest, use the URL for the XML extension files you just uploaded. If you are installing the Sunlight Labs extension, you will need to obtain a free API key from Sunlight here. Click "Add Key", and create a key with the name api-key and the use the API key for the value. Click Edit Extension, and you're ready to go!
Using the Extensions
Using the extensions to gather information is easy. Now the ability to retrieve government data and use it is only a few clicks away.
To access them via the Extension Manager, click the Extensions button, and scroll down to either the Capitol Words or Sunlight Labs extension.

Choose the desired function, and enter the requisite data, and click "Insert Extension".

The Dekiscript (MindTouch's scripting language for mashing-up data from Deki, extensions, and virtually any XML/JSON web-service, more on that here) needed to invoke the extension is automatically generated; users don't have to know programming at all to use this! Click Save, Depending upon the method chosen, MindTouch will automatically go out to retrieve the data and return it in either a key/value map, or formatted as a table.

This particular method will return a list of words in key/value map format, showing the top 5 words, their wordcount, and the date:
return value could not convert from 'xml' to 'list' (click for details)Callstack:
at en/kb/Integrating_MindTouch_with_Sunlight_Foundation_APIs
at capitol.WordOfDay
MindTouch.Deki.Script.Runtime.DekiScriptRemoteException: return value could not convert from 'xml' to 'list'
at MindTouch.Deki.Script.Runtime.TargetInvocation.DekiScriptRemoteInvocationTarget.InvokeMap (MindTouch.Deki.Script.DekiScriptRuntime runtime, MindTouch.Deki.Script.Expr.DekiScriptMap args) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Runtime.TargetInvocation.ADekiScriptInvocationTarget.Invoke (MindTouch.Deki.Script.DekiScriptRuntime runtime, MindTouch.Deki.Script.Expr.DekiScriptLiteral args) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.DekiScriptRuntime.Invoke (Location location, MindTouch.Dream.XUri uri, MindTouch.Deki.Script.Expr.DekiScriptLiteral args, MindTouch.Deki.Script.Runtime.DekiScriptEnv env) [0x00000] in <filename unknown>:0
This is interesting, but the individuals and entities will really be able to bring the "power to the people" when they use that data and create mashups to make the data pertinent to them; users can now quickly and easily generate sophisticated reports, meaningful dashboards,
Complete Profile Page
This template shows an example of retrieving information from the Sunlight Labs API, and using that information to reach out to other APIs (such as Capitol Words, Google, and even Twitter) to create useful and up-to-the-second info data displays. This profile template was also demonstrated in a workshop presented by MindTouch at the Government 2.0 Camp.
Template call:
{{ template.profile{lastname: "boxer"} }}
missing value for parameter 'bioguideId' (index 0) (click for details)Callstack:
at en/kb/Integrating_MindTouch_with_Sunlight_Foundation_APIs
at Template:Profile
at capitol.lawmakerTopWordsMonth
MindTouch.Deki.Script.Runtime.DekiScriptRemoteException: missing value for parameter 'bioguideId' (index 0)
at MindTouch.Deki.Script.Runtime.TargetInvocation.DekiScriptRemoteInvocationTarget.InvokeMap (MindTouch.Deki.Script.DekiScriptRuntime runtime, MindTouch.Deki.Script.Expr.DekiScriptMap args) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.Runtime.TargetInvocation.ADekiScriptInvocationTarget.Invoke (MindTouch.Deki.Script.DekiScriptRuntime runtime, MindTouch.Deki.Script.Expr.DekiScriptLiteral args) [0x00000] in <filename unknown>:0
at MindTouch.Deki.Script.DekiScriptRuntime.Invoke (Location location, MindTouch.Dream.XUri uri, MindTouch.Deki.Script.Expr.DekiScriptLiteral args, MindTouch.Deki.Script.Runtime.DekiScriptEnv env) [0x00000] in <filename unknown>:0