Missing Class: OpenSocialResponse...

0 views
Skip to first unread message

Mark W.

unread,
Nov 30, 2009, 9:17:43 AM11/30/09
to opensocial-client-libraries
Greetings...
I just checked out trunk. There appears to be a build problem that
several of us are getting. Specifically, we are missing a class,
OpenSocialResponse. This is referenced in OpenSocialBatch and
OpenSocialClient.

http://code.google.com/p/opensocial-java-client/issues/detail?id=20

Would it be possible to take a look at this?

Thanks,
-Mark W.

Mark W.

unread,
Nov 30, 2009, 10:27:56 AM11/30/09
to opensocial-client-libraries
I went back into the history and pulled out the
OpenSocialResponse.java. I hacked at it a bit to fix the person and
appdata methods & commented out the collection.
I don't know if this is the right thing to do, but most of the junits
pass. This will probably get us by for the short term.

OpenSocialResponse.java is attached here:
http://code.google.com/p/opensocial-java-client/issues/detail?id=20

Jason (Google)

unread,
Nov 30, 2009, 12:06:26 PM11/30/09
to opensocial-cl...@googlegroups.com
Hi Mark. Thanks for calling this to our attention and posting a workaround -- we'll have this addressed as soon as possible.

I'm in the middle of preparing a large update to the library, and I'll be posting this as a featured download before the end of December, so stay tuned.

- Jason

--

You received this message because you are subscribed to the Google Groups "opensocial-client-libraries" group.
To post to this group, send email to opensocial-cl...@googlegroups.com.
To unsubscribe from this group, send email to opensocial-client-l...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/opensocial-client-libraries?hl=en.



Mark W.

unread,
Nov 30, 2009, 3:53:39 PM11/30/09
to opensocial-client-libraries
Is there any preview of what's going to be in the update?
-Mark W.
> > opensocial-client-l...@googlegroups.com<opensocial-client- libraries%2Bunsu...@googlegroups.com>
> > .

Mark W.

unread,
Nov 30, 2009, 10:40:47 PM11/30/09
to opensocial-client-libraries
Jason,

Sorry... Was in a hurry this afternoon & should have provided a bit
more detail on my question.

I was wondering if you'd consider adding as part of your update a
couple of factory classes, one for the client and one for users.
What we've done is created a simple XML file that has the keys & id in
it. Since you get one client per app per provider, this works out
well. Here's what it looks like:
<applications>
<application id="ClientSample">
<provider id="ORKUT_SANDBOX"
class="org.opensocial.providers.OrkutSandboxProvider">
<entry key="DEBUG">false</entry>
<entry key="CONSUMER_KEY">orkut.com:623061448914</entry>
<entry key="CONSUMER_SECRET">uynAeXiWTisflWX99KU1D2q5</entry>
</provider>
</application>
</applications>

These can be any key/value pair at all, including the REST/RPC
endpoints. The advantage is that we could probably eliminate a number
of the specialized subclasses that are already there and just
configure the endpoints. We'd only have to specialize in the case of
something like MySpace, where there's actual processing that needs to
be done. Come to think of it, we'd probably want an interface here as
well.


We then have something similar for users:
<people>
<person canonicalId="jane.doe">
<provider name="GOOGLE">1xxx966</provider>
<provider name="ORKUT_SANDBOX">0xxx752</provider>
<provider name="SHINDIG">jane.doe</provider>
<provider name="FRIENDCONNECT">1xxx426</provider>
</person>
</people>

I can now write something like...
String providerName = "ORKUT_SANDBOX"; //could continue to
be the enum, constant, et.
OpenSocialClient c = OpenSocialClientFactory.instance
().getClient("ClientSample", providerName);
String userId = OpenSocialPersonIdManager.instance
().getUserIdForProvider("jane.doe", providerName);
Collection<OpenSocialPerson> friends = c.fetchFriends();
......

Is this in line with some of the work you are doing?

Thanks again,
-Mark W.

niuchl

unread,
Dec 2, 2009, 9:45:21 AM12/2/09
to opensocial-client-libraries
Actually, OpenSocialResponse.java isn't needed anymore. I made a small
patch to remove the dependency.
The patch is attached here:
http://code.google.com/p/opensocial-java-client/issues/detail?id=20

Thanks.

Jason (Google)

unread,
Dec 3, 2009, 2:04:40 PM12/3/09
to opensocial-cl...@googlegroups.com
Hi Mark. Thanks for the idea. It may not make it in the first release, but I'll keep in mind. You can take the new library for a run right now -- it currently has REST/RPC support for fetching people, fetching, updating, and removing app data, and fetching and creating activities. Auth-wise, it supports 2-legged and 3-legged OAuth. You can see the included tests for an example of how to use it -- from a user's perspective, it's not TOO different from the existing client, but there are changes.

I'm hoping to package this up as a new featured download by the end of the month, and I'm interested in getting early feedback.


Cheers!
- Jason

To unsubscribe from this group, send email to opensocial-client-l...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages