我正在研究tincan JavaScript API。我的數據格式的問題是徹底改變,TinCan已經指定了爲什麼將數據與呼叫一起傳遞。幫助我以TinCan Api格式調整數據。以下是我的一個電話的示例數據。需要幫助來實現Tincan Javascript API
VAR數據= { 「的groupId」: 「的groupId」, 「組名」: 「gNameEncrypt」, 「tutorNames」: 「tutorNames」, 「actorNames」: 「actorNames」, 「otherNames」:「 otherNames「 };
當前我所做的只是解碼這些數據並將其發送。
var actionList = new TinCan(
{
recordStores: [{
endpoint: "http://example.com",
username: username,
password: password,
allowFail: false
}]
});
var action = new TinCan.Agent({
"name": "insert"
});
actionList.getStatements({
'params': {
'agent': action,
'verb': {
'id': $.base64.encode(data)
}
},
'callback': function (err, data) {
console.info(data.more);
var urlref = "http://<?php echo $_SERVER['SERVER_NAME'] . ":" . $_SERVER['SERVER_PORT'] . $uriParts[0] . "?" ?>t=" + data.more.TutorToken;
window.location.href = urlref;
}
});
crypt.finish();
});
#Brian J. Miller我明白你說的是什麼?我也遵循這些鏈接來實施TinCan。但我主要關心的是我的數據在我的情況下,我的數據隨着每條語句而改變。這裏是我的應用程序的測試鏈接http://test.lip-app.eu請看看這個,並建議我如何調整tincan對象中的數據? –