Skip to content

Instantly share code, notes, and snippets.

@salathe
Created November 1, 2010 20:34
Show Gist options
  • Save salathe/be8a5216cb4a141afc0c to your computer and use it in GitHub Desktop.
Save salathe/be8a5216cb4a141afc0c to your computer and use it in GitHub Desktop.
diff --git a/guardian/guardian.content.item.xml b/guardian/guardian.content.item.xml
index 4504652..8042692 100644
--- a/guardian/guardian.content.item.xml
+++ b/guardian/guardian.content.item.xml
@@ -9,18 +9,21 @@
<bindings>
<select itemPath="response.content" produces="XML">
<urls>
- <url>http://content.guardianapis.com/{item_id}</url>
+ <url>http://content.guardianapis.com/</url>
</urls>
<inputs>
<key id="api_key" type="xs:string" paramType="query" required="true" private="true" />
<key id="format" type="xs:string" paramType="query" default="xml" const="true" />
<!-- problem with the encoding of this key in the path, posted question to @yql already -->
- <key id="item_id" type="xs:string" paramType="path" required="true"/>
+ <key id="item_id" type="xs:string" paramType="variable" required="true"/>
<key id="show-fields" type="xs:string" paramType="query" default="all" />
<key id="order-by" type="xs:string" paramType="query" default="newest" />
</inputs>
+ <execute><![CDATA[
+ response.object = request.path(item_id).get().response;
+ ]]></execute>
</select>
</bindings>
</table>
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment