You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SPECIFICATION BUGS ONLY - Description =====================================
I note that there is currently no API to access the collection of Link elements defined for a gadget spec. This seems like an important limitation.
As a Gadget developer, it would be handy to be able to define links such that I can reference them easily within code and have the container proxy the requests for me.. e.g. if I have...
And again, have the container proxy those links for me with appropriate authentication in place.
Document affected: ================== 1.) Please attach a patch for the document if appropriate. 2.) Post a thread at http://groups.google.com/group/opensocial-and-gadgets-spec/topics linking to this issue report. 3.) Post a comment on this issue, linking back to the thread.
Original author: [email protected] (April 06, 2012 19:51:53)
SPECIFICATION BUGS ONLY - Description
=====================================
I note that there is currently no API to access the collection of Link elements defined for a gadget spec. This seems like an important limitation.
As a Gadget developer, it would be handy to be able to define links such that I can reference them easily within code and have the container proxy the requests for me.. e.g. if I have...
<Module>
<ModulePrefs>
<Link rel="foo" href="http://example.org" authz="signed" />
<Link rel="foo" href="http://example.net" authz="oauth2" />
<Link rel="bar" href="http://example.com" authz="none" />
</ModulePrefs>
...
</Module>
Then within my Javascript code, I should be able to do something along the lines of...
osapi.links.foo[0].get().execute(function(result) {...});
osapi.links.foo[1].get().execute(function(result) {...});
osapi.links.bar.get().execute(function(result) {...});
And have the container fetch the linked resource for me with proper authentication handled.
Alternatively, we can add a label to Link's to differentiate between multiple instances of a single rel...
<Module>
<ModulePrefs>
<Link rel="foo" label="one" href="http://example.org" authz="signed" />
<Link rel="foo" label="two" href="http://example.net" authz="oauth2" />
<Link rel="bar" href="http://example.com" authz="none" />
</ModulePrefs>
...
</Module>
Such that...
osapi.links.foo["one"].get().execute(function(result) {...});
osapi.links.foo["two"].get().execute(function(result) {...});
osapi.links.bar.get().execute(function(result) {...});
I should also be able to reference the links using variable substitution... e.g.
<img src="${Links.foo.1}" />
<img src="${Links.foo.2}" />
<script src="${Links.bar}" />
<iframe src="${Links.foo.one}" />
And again, have the container proxy those links for me with appropriate authentication in place.
Document affected:
==================
1.) Please attach a patch for the document if appropriate.
2.) Post a thread at
http://groups.google.com/group/opensocial-and-gadgets-spec/topics
linking to this issue report.
3.) Post a comment on this issue, linking back to the thread.
Original issue: http://code.google.com/p/opensocial-resources/issues/detail?id=1291
The text was updated successfully, but these errors were encountered: