Tim,

Thanks for your help.  Just knowing to stop staring at rpc was a big help.  :)

This bit works and gets the client / server round trip to happen:

 osapi.ims.getInfo().execute(function(result) {
    alert('Welcome back');
  });

I figured it was simple :)

But that makes me wonder if I am violating abstraction boundaries of have taken 
an incorrect approach.  I somewhat thought I was making a "gadget extension" 
not an "open social" extension - but perhaps I *am* writing an opensocial 
extension after all since I do want identity, friends, context, etc.

I look in core.io and find the basic support to do XHR requests, but perhaps I 
really want to be operating at an open social level.  I will play some more to 
understand things better.

For now, I am back off and running, and having fun figuring the code out.  
Thanks.

/Chuck


On Jun 30, 2010, at 11:06 AM, Tim Wintle wrote:

> On Wed, 2010-06-30 at 09:23 -0400, csev wrote:
>> I have trolled through the code of the various features, looking for a
>> simple code sequence to call a server-side service from a feature and
>> get a response.  I expect there is some simply and elegant utility bit
>> I have not yet found.
> 
> <snip>
> 
>> This gives me "Unknown RPC service: ims.getInfo".  I am sure that I am
>> just missing some obvious pattern. 
> 
> gadgets.rpc is for calling client-side rpc services (javascript services
> registered in the container hosting the gadget).
> 
> you might be looking for the gadgets.io.* methods
> 
> http://opensocial-resources.googlecode.com/svn/spec/1.0/Core-Gadget.xml#rfc.section.12.2
> 
> Tim Wintle

Reply via email to