In this example we are going to make two separate calls with an end goal of getting Klout Score of a Twitter User:
To use the chain, we would simply make one call via POST, as such:
http://api-multi-request.demos.mikestowe.com/klout/api/v2/multirequest
[
{
"doOn": "always",
"href": "/identity.json/twitter?screenName=mikegstowe",
"method": "get",
"data": {},
"return": ["id"]
},
{
"doOn": "200",
"href": "/user.json/${body.id}/score",
"method": "get",
"data": {},
"return": ["score"]
}
]
While required to make two calls, we have now successfully obtained both the Klout ID to store for later, and the Klout score.