You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by John Bartak <jo...@autodesk.com> on 2009/05/26 23:57:07 UTC
How do you expand an Activity retrieved from the REST based SPI?
I am writing a client application (in C#) that retrieves Activities from an OpenSocial container (implemented through Shindig). Right now the container returns an empty Title field and filled in TitleId and TemplateParams fields. What is the right way (and where is the right place) to expand the TitleId and TemplateParams fields?
Some options I've considered:
* Expand the TitleId field into text in the client. I'd have to write a library to download the gadget.xml, retrieve the messageBundles, and expand the template retrieved from the message bundle. Seems pretty straight forward, but there does not seem to be a way to retrieve the gadget.xml given the data contained in an Activity. If you have activities from multiple applications and the appId stored in the activity is just a string, how can you figure out the URL to the gadget.xml? There doesn't seem to be any API to retrieve the URL to the gadget.xml.
* Expand the TitleId on the server and store it in the Title field. Leave the TitleId and TemplateParams fields filled out in the activity returned to the client in case it wants to do some processing on the activities. This gets around the problem of retrieving the gadget.xml given the appId because when an application is registered with my server, I store the location of the gadget.xml.
What's the accepted way of doing this? Do considerations about activity aggregation matter in this decision?