13.14 opensocial.data API and examples are incorrect
simonhewett opened this issue · 1 comments
simonhewett commented
The example for 13.14 has an incorrect method for getting the DataContext:
var viewer = opensocial.data.getContext().getDataSet('Viewer');
alert('Hello ' + viewer.name);
os.data.getDataContext().putDataSet('Params', {"Page": 2, "PageSize": 10});
opensocial.data.getDataContext().registerListener('Friends', function(key) {
var el = document.getElementById('friend-details');
el.style.display = 'show';
});
So should be updated to this:
var viewer = opensocial.data.getDataContext().getDataSet('Viewer');
alert('Hello ' + viewer.name);
opensocial.data.getDataContext().putDataSet('Params', {"Page": 2, "PageSize": 10});
opensocial.data.getDataContext().registerListener('Friends', function(key) {
var el = document.getElementById('friend-details');
el.style.display = 'show';
});
And the API definition for 13.14.1 is incorrect:
13.14.1 getContext
Signature
<static> DataContext opensocial.data.getContext()
So should be updated to this:
13.14.1 getDataContext
Signature
<static> DataContext opensocial.data.getDataContext()
mgmarum commented
Thanks Simon, I'll look into this.