On Thu, 2009-07-09 at 19:33 +0200, Johan Euphrosine wrote:
> On Sun, 2009-07-05 at 16:22 +0200, Johan Euphrosine wrote:
> > Hi,
> > 
> > I made primitive integration of a jpoker widget into opensocial:
> > http://upstream.jspoker.pokersource.info/raw-file/tip/jpoker-opensocial.xml
> > 
> > You can try it out there:
> > http://shindig.opensocial.dachary.org/gadgets/ifr?url=http://upstream.jspoker.pokersource.info/raw-file/tip/jpoker-opensocial.xml
> > 
> > I also filled the following bug in shindig:
> > "ProxyHandler fetch/fetchJson methods always returns 404 on error"
> > https://issues.apache.org/jira/browse/SHINDIG-1106
> > 
> > Currently is relies on a jsonp trick, setting CONTENT_TYPE =
> > gadgets.io.ContentType.TEXT, and running eval on the proxified result,
> > instead of native opensocial gadgets.io.json.parse (when CONTENT_TYPE =
> > gadgets.io.ContentType.JSON).
> > 
> > It could be deprecated as soon as poker-network implemente:
> > "opensocial : poker-network must accept POKER_REST content from content
> > field"
> > https://gna.org/task/index.php?6656
> > 
> > Feedbacks are welcome.
> 
> Hi,
> 
> I updated jpoker opensocial widget so that:
> 
> - It displays a table instead of a tableList.
> - It sets the background color of this table, given the GENDER or the
> VIEWER of the page.
> 
> Feel free to give it a try after login in
> partuza.opensocial.dachary.org:
> http://partuza.opensocial.dachary.org/profile/application/3/4/17
> 
> As a next step, it would be nice to be able to color player seat
> according to their gender.
> 
> After reading:
> http://wiki.opensocial.org/index.php?title=Requesting_Data_in_OpenSocial#A_note_about_OpenSocial_identifiers
> 
> It seems possible to access information for an arbitrary user, but I've
> been unable to make it working, using partuza user id (example: "2" for
> user proppy).

Hi,

I finally managed to make it work, I was confusing the calling
convention of two opensocial API functions:
http://wiki.opensocial.org/index.php?title=Opensocial.DataRequest_(v0.8)#newFetchPeopleRequest
http://wiki.opensocial.org/index.php?title=Opensocial.DataRequest_(v0.8)#newFetchPersonRequest

I updated jpoker-opensocial.xml:
Each player name background is colored according to their gender.
http://upstream.jspoker.pokersource.info/raw-file/tip/jpoker-opensocial.xml

Please note the current limitation, player.serial are not matching
partuza userId yet, they are hardcoded inside the gadget:
var user2id = {"dachary": "1", "proppy": "2", "proppy2": "3"};
-- 
Johan Euphrosine <[email protected]>

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Pokersource-users mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-users

Reply via email to