Page 1 of 1

ManiaPlanet WebServices JavaScript SDK

Posted: 26 May 2012, 15:33
by magnetik
Hi,

I started a little project of porting the PHP SDK to JavaScript.
Actually it's written in CoffeeScript which is compiled to JavaScript

The code is here: https://github.com/magnetik/maniaplanet-ws-js-sdk

Download here : https://github.com/magnetik/maniaplanet ... all/master


Feel free to contribute (as TheM did ;) ) and make pull requests if you see some stuff to improve.

Re: ManiaPlanet WebServices JavaScript SDK

Posted: 15 Jul 2012, 17:41
by anvolcano
Nice! As someone who mainly uses Python and JavaScript, I'm glad to see the SDK in more languages :)

Re: ManiaPlanet WebServices JavaScript SDK

Posted: 16 Jul 2012, 15:25
by sylario
It's great but.. from what i remember, doing an ajax call to an URL different from where the script have been downloaded is impossible due to crossdomain attack. is it some kind of server-side JS like node.js?

Re: ManiaPlanet WebServices JavaScript SDK

Posted: 16 Jul 2012, 15:37
by magnetik
There is a way to bypass this : JSONP, it is used in this script.

Moreover I'll add the compatibility with node.js

Re: ManiaPlanet WebServices JavaScript SDK

Posted: 17 Jul 2012, 10:16
by sylario
So i could build a page with JS that would transform the document in a webservice client, with the requests navigating directly between ws.maniaplanet and the browser.

Do you plan on using your port for some kind of project?

EDIT: Did not saw you were from NADEO ><