Hi

I'm trying to write a simple test case gadget that will write an
activity and then retrieve it for the viewer of the gadget.

I'd like to do it using the osapi calls.

This is what I have:

//SET
osapi.activities.create({userId: '@viewer', activity: {title:
'Hello!', url: 'http://mms-oxford.com'}}).execute(function(response) {
        alert('callback:'+gadgets.json.stringify(response));
  });


//GET

var params = {
auth: {"default" : null, "type" : "AuthToken"},
    userId: "@me",
    groupId: "@self",
    appId: "@app",
//    activityIds :  ["YYYYYYY", "ZZZZZZZ"], //I'm not sure about
these
    fields: "@all",
    count: 10,
    startIndex: 0,
    startPage: 0
};
    osapi.activities.get(params).execute(function(response) {
        alert('callback:'+gadgets.json.stringify(response));
   });

The create attempt produces internal error code 500. The second
appears to work - it just say there are no activities, which seems to
make sense. Though I'm not sure if I'd have to pass it the activity
ids - surely I can just get the last 10?

My chief problem therefore is:

how do I create an activity using osapi?

With thanks

Kropotkin

-- 
You received this message because you are subscribed to the Google Groups 
"iGoogle Developer Forum" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/Google-Gadgets-API?hl=en.

Reply via email to