私は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のテストリンクです。これを見て、ティンカンオブジェクトのデータをどのように調整するのですか? –