Ticket #2592 (new enhancement)

Opened 2 years ago

Last modified 6 months ago

Connecting Smarty to XML-RPC to create a content API

Reported by: douglas Assigned to: anonymous
Priority: normal Milestone:
Component: Template Engine Version:
Severity: feature Keywords:
Cc:

Description

First, it's important to make a distinction between a content API and a plugin API. A lot of what I'm thinking about involves a content API, so that we have alternate ways of making content available to third parties.

There are a couple of uses where a content API would be helpful; one is in content syndication, but the big one is in creating mashups that would combine content from a Campsite server with info from other servers, such as Google Maps or the Sunlight Foundation or what have you. In this way, content delivered via such an API with a key may even become a source of revenue for publishers.

The question I had about doing something like this via an API was this: Can Smarty deliver content on the basis of XML-RPC requests that would then get translated through templates? I presume it's pretty easy to add some XML-RPC tags to the returned content, too, right? If that were the case, it would be a lot easier to create such an API because it could leverage many (if not all) of the functions already included in the Campsite templating language; very loosely defined, the templating language is an API, right?. If that were the case, I suppose you'd have to have a module listening for XML-RPC calls on one side, then acting on those calls. The steps could look like this:

- Third party user calls the Campsite server via XML-RPC (or REST or whatever)

- Smarty on the Campsite server has a module listening for XML-RPC

- User is authenticated (presumably with LiveUser?)

- User request, including any Campsite templating command, is passed to Campsite templating/Smarty for action

- Campsite templating/Smarty returns content

- Module returns content to third party user in XML-RPC format

We already use Campsite templating to create RSS feeds, so not much changes there. I suppose the big difference is in having the templating commands accessible via XML-RPC.

Change History

07/23/08 19:21:47 changed by mugur

  • version changed from 3.1.0 to none.
  • milestone changed from 3.2 to 3.3.

05/13/09 18:11:57 changed by mugur

  • version deleted.
  • milestone changed from 3.3 to 3.4.

06/04/09 15:20:48 changed by sava

  • milestone changed from 3.4 to ccp_requests.

temporarily moved to different milestone for planning purposes

10/27/09 14:49:35 changed by sava

  • milestone deleted.