API documentation
Moderator: NADEO
API documentation
I will not be using the SDK (working in ruby on rails), is there a documentation of the API itself?
http://www.statsmania.net Maniaplanet ladders
Re: API documentation
Hi,
I guess nobody from nadeo will answer this weekend, so I try to give you some informations.
The SDK uses the REST API. You can get further information about this from gouxims post here:
http://forum.maniaplanet.com/viewtopic. ... 212#p19721
I am not so familiar with ruby on rails but you should search for "RESTful Rails", I think.
best regards, Jojo
I guess nobody from nadeo will answer this weekend, so I try to give you some informations.
The SDK uses the REST API. You can get further information about this from gouxims post here:
http://forum.maniaplanet.com/viewtopic. ... 212#p19721
I am not so familiar with ruby on rails but you should search for "RESTful Rails", I think.
best regards, Jojo
Re: API documentation
Thanks, but what i am actually looking is this kind of documentation : http://wiki.eve-id.net/APIv2_Page_Index
The description of all the info you can get from the API. Currently i must browse the SDK code hoping that i'll miss nothing.
The description of all the info you can get from the API. Currently i must browse the SDK code hoping that i'll miss nothing.
http://www.statsmania.net Maniaplanet ladders
Re: API documentation
Nah, nothing like this is available. Also at NADEO it's quite common to let the people figure out how things work, instead of providing documentation....
Just stick to the descriptions in this thread: http://forum.maniaplanet.com/viewtopic.php?f=282&t=5058 and get the URLs from the PHP code.
Just stick to the descriptions in this thread: http://forum.maniaplanet.com/viewtopic.php?f=282&t=5058 and get the URLs from the PHP code.
Re: API documentation
Ok, the API does not seems to be Restful at all, the Built in API connector of ruby on rails cannot work with the maniaplanet API ><
I'l have to write a connector to use maniaplanet API.
I'l have to write a connector to use maniaplanet API.
http://www.statsmania.net Maniaplanet ladders
Re: API documentation
The web service is as RESTful as it can get. Gouxim put a lot of work into the web service and I'm sure he followed the concepts of REST down to every detail.sylario wrote:Ok, the API does not seems to be Restful at all
That's an RoR problem then. The web service works well in other languages such as PHP and C#.sylario wrote:the Built in API connector of ruby on rails cannot work with the maniaplanet API ><
Kudos for using RoR though.

Mania Exchange - Share your maps!
ASUS Maximus IV GENE Z / i7 2600K 3.40Ghz QC / 16GB G.Skill Ripjaws DDR3 / GTX 560 Ti
Need technical help for ManiaPlanet? Click here.
ASUS Maximus IV GENE Z / i7 2600K 3.40Ghz QC / 16GB G.Skill Ripjaws DDR3 / GTX 560 Ti
Need technical help for ManiaPlanet? Click here.

Re: API documentation
You can see quickly most of available method of the WebService API by searching '\$this->execute\(' in google code.
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
Re: API documentation
My bad, it seems that the mania API use unusual syntax but is RESTful. I overrided a rails method and nows it works fine. RoR does not like API without .xml or .json ath the end of query.
http://www.statsmania.net Maniaplanet ladders
Re: API documentation
Our API is indeed RESTful and we put lot of effort in doing that. However, it's important to rememeber that REST is not a protocol but more a philosophy. It's basically the idea to use as much of the HTTP protocol as possible.
For instance if you need authentication, why make your own system with required parameters and stuff when you can simply rely on the HTTP Basic Authentication scheme? Another good example is input/output encoding specification: just use the HTTP Accept & Content-type headers.
Try GETting that:
https://ws.maniaplanet.com/foobar/index.json
https://ws.maniaplanet.com/foobar/index.txt
https://ws.maniaplanet.com/foobar/index.html
It's simple to use. Just add "index.json" after any of the URL of the API. Another example:
http://ws.maniaplanet.com/players/gouxim/index.json
If you have other questions regarding how the API works, don't hesitate to ask.
Hope it helps
For instance if you need authentication, why make your own system with required parameters and stuff when you can simply rely on the HTTP Basic Authentication scheme? Another good example is input/output encoding specification: just use the HTTP Accept & Content-type headers.
It's sad, because it's better to rely on the Accept header in the request and the Content-Type header in the response, which could be something like "application/json". However, the API do support extensions to specify the requested type! Note that it only works for specifying the type of the response, it won't work for specifying how you encode your data when POSTing something (for that you need to use the Content-Type header in your POST request).sylario wrote:RoR does not like API without .xml or .json ath the end of query.
Try GETting that:
https://ws.maniaplanet.com/foobar/index.json
https://ws.maniaplanet.com/foobar/index.txt
https://ws.maniaplanet.com/foobar/index.html
It's simple to use. Just add "index.json" after any of the URL of the API. Another example:
http://ws.maniaplanet.com/players/gouxim/index.json
If you have other questions regarding how the API works, don't hesitate to ask.
Hope it helps

Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 

Re: API documentation
It works great!
Now i am setting up a cache system for the query to the API, i guess i'll cache info 15mins to 1hour.
Now i am setting up a cache system for the query to the API, i guess i'll cache info 15mins to 1hour.
http://www.statsmania.net Maniaplanet ladders
Who is online
Users browsing this forum: No registered users and 1 guest