Phil Sturgeon

Web developer, kayaker, outdoors madman and part-time alcoholic.


ExpressionEngine 2.0: Rest

Integrate RESTful API's into your ExpressionEngine 2.0 website with this Rest module. You can list Tweets, search for Digg articles, show off Flickr photographs and interact with any open RESTful API.

But how?

You can create REST requests in the backend module and reference them with Template Syntax, then loop through the returned response. Everything sent back from the API is converted into a loopable ExpressionEngine array wether its XML, JSON, Serialized data, pure PHP or CSV. It will even include XML attributes as well as node values.

{exp:rest name="foo"}
  {some_value}<br />
{/exp:rest}

Rest module can do more than just grab information from predefined requests. You can create REST requests on the fly:

{exp:rest url="http://example.com/" verb="get" format="json" param:foo="bar"}
  {some_value}<br/>
{/exp:rest}

You could use this syntax with other Template Tags and create some very dynamic flexible sites.

Where can I find it?

As with all the best ExpressionEngine add-ons, you can buy this module on Devot:ee for a very reasonable $30.


Comments

User comments
  • Gravatar Jason

    Aug 25, 2010

    How do you suggest handling links in the Twitter timelines... for example, linking to user names or links people tweet out?

  • Gravatar Jason

    Aug 25, 2010

    Maybe I'm missing something, but where are the docs on how to install this?

  • Gravatar Marcus Neto

    Aug 19, 2010

    Trying to follow along in the video for the flickr portion but the video is extremely tiny and you move pretty quick without talking through what you are doing. Any chance of some detailed documentation?

  • Gravatar Trevor Davis

    Aug 18, 2010

    Can you nest REST requests? So if I want to use a flickr.people.getPublicPhotos request, and then pass the {id} of each photo into a flickr.photos.getSizes REST request, it doesn't seem to parse {id}.

  • Gravatar Dave Brookes

    Aug 05, 2010

    Can you think about adding some kind of fallback for when the API is down? When the Twitter API is down it just spits out raw tags.

  • Gravatar Phil Fish

    Jul 24, 2010

    Can't see the video. The text is too tiny and it doesn't allow us to enlarge.

  • Gravatar http://philsturgeon.co.uk/

    Jul 19, 2010

    You can build your requests on the fly using any template tags you like. If EE supports it, the Rest module will.

  • Gravatar Joyce

    Jul 17, 2010

    Using your plugin, can REST requests be dynamically generated using channel field? E.g., I have a channel for organizations that includes a custom field for twitter username. I want to display a twitter feed for each organization, but the REST request needs to be dynamically generated from the custom field.

  • Gravatar Tim

    Jul 09, 2010

    I think I just salivated a little bit.

    I'd go for a 1.6.x version.

  • Gravatar Todd

    Jul 08, 2010

    I think I'd love to see a 1.6.9 version of this... I want to move to 2.1 when EllisLab puts its final stamp on it, but I have a feeling I'm still going to be waiting for a couple of third-party add-ons. It'll be nice to add REST and know I'll have an update path for it, unlike other add-ons that I currently have which have no ETA for 2.0 compatible versions.

  • Gravatar http://philsturgeon.co.uk/

    Jul 07, 2010

    I could make a 1.6.x version if there is enough demand. Is there any point with 1.6.x being on the way out?

  • Gravatar Scott Boyde

    Jul 05, 2010

    Phil

    Nice addition to EE, trying to watch the video and it won't let me toggle full screen so can't see it properly.

  • Gravatar Wes

    Jul 03, 2010

    Any plans for a 1.6.x version of this module?

Post a comment