To retrieve API results as JSON, send a format
parameter with the value json
.
Optionally, a callback function can be specified with the parameter callback
.
{"rsp":{
"stat":"ok",
"api_key":"9bb013121e8f3650f350b622a1735442",
"foo":"bar",
"format":"json",
"method":"rtm.test.echo"
}
}
If a callback
parameter with value RTM.apiCallback
was sent, a result similar to the following will be emitted:
RTM.apiCallback(
{"rsp":
{
"stat":"ok",
"api_key":"9bb013121e8f3650f350b622a1735442",
"callback":"RTM.apiCallback",
"foo":"bar",
"format":"json",
"method":"rtm.test.echo"
}
}
)
{"rsp":{
"stat":"fail",
"err":{
"code":"112",
"msg":"Method \"rtm.test.ech\" not found"
}
}
}