Elma Online API

Advertise your levels, contests, sites etc.

Moderator: Moporators

Post Reply
User avatar
Kopaka
39mins club
Posts: 6473
Joined: 23 May 2002, 13:59
Team: LAME
Location: In a northern danish city beating YOUR record.
Contact:

Elma Online API

Post by Kopaka » 11 Jul 2011, 23:52

It has always been my plan to do some sort of RSS feed from eol making it possible for contest holders and site admins to use data from eol on their sites. Giving the recent developments I've sped up this proces and can now present the first version of an EOL API, powered by an rss feed.

You can access the rss feed directly from http://.elmaonline.net/rss/ and input the level indices of the levels you want data from.

Or you can, which I would recommend, use the API Class for PHP I've made. It makes it easy to access the rss feed, set the different parameters and gives you the data in a nice array. You can download it from http://elmaonline.net/rss/rss.zip which includes an example PHP page which also has information about the different parameters you can set. It includes a method for verifying a specific time, and a method for getting times from any number of levels in an array.

(You can also access these links from the help page on the EOL site.)

There's not a lot of functionality yet, but there is the most basic stuff like times, nick, datetime and placement. You can improve on the class ofcourse but in most cases you would need an update in the RSS feed to get more information. I will probably improve on it, but if there's something specific you need feel free to ask for it.

I can see some people have been putting filename (like: snaab101) as level id, this is NOT how you should do it. If you want snaab101 you search for it on eol site and look at the url http://elmaonline.net/?s=stats&p=level&l=43329 and the last number after l= (43329) is the id that you should put into the code as levelid.

To get internals here is an array with the ids for internals.
$intid = array(1 => 2, 2 => 4, 3 => 5, 4 => 6, 5 => 7, 6 => 8, 7 => 9, 8 => 10, 9 => 15, 10 => 59, 11 => 78, 12 => 109, 13 => 139, 14 => 219, 15 => 71, 16 =>51, 17 => 165, 18 => 57, 19 => 128, 20 => 197, 21 => 43, 22 => 107, 23 => 98, 24 => 100, 25 => 175, 26 => 192, 27 => 38, 28 => 198, 29 => 31, 30 => 16, 31 => 18, 32 => 164, 33 => 66, 34 => 131, 35 => 156, 36 => 357, 37 => 45, 38 => 13, 39 => 408, 40 => 412, 41 => 24, 42 => 416, 43 => 415, 44 => 95, 45 => 29, 46 => 33, 47 => 46, 48 => 21, 49 => 52, 50 => 257, 51 => 135, 52 => 133, 53 => 413, 54 => 17);

So for example if you want apple harvest you give it levelid 17.

Please don't misuse it, for example don't have it read the times from eol everytime your pages is loaded, rather have it check for new times every once in a while and update those to your own db, or verify the times everytime someone uploads a new time. And know that you are being logged (only to know if people misuse it).

This should hopefully make it possible for external contests to survive. I will be adding this functionality to cupSource, Kopasite at some point.
Last edited by Kopaka on 28 Jan 2012, 15:56, edited 2 times in total.

User avatar
niN
Kuski
Posts: 2631
Joined: 22 Aug 2005, 12:23
Team: HoHo
Location: Sweden, Gothemburg
Contact:

Re: Elma Online API

Post by niN » 11 Jul 2011, 23:57

This is great! And so are you!

Thanks a lot =) Keep up the good work!
Team HotHorses, and I'm converting to Icelandian now...

User avatar
ville_j
Kuski
Posts: 1506
Joined: 17 Aug 2002, 15:45
Team: IS
Location: on the roof
Contact:

Re: Elma Online API

Post by ville_j » 12 Jul 2011, 00:39

Yeah very good! I was just about thinking pming you to ask about the plans on this thing and now you post this. Gonna have a look at it how it works!
< roopemies> horror and frustrating and can't play, sounds just like you
Beer battle winner 2014 and 2015

User avatar
ville_j
Kuski
Posts: 1506
Joined: 17 Aug 2002, 15:45
Team: IS
Location: on the roof
Contact:

Re: Elma Online API

Post by ville_j » 13 Jul 2011, 00:54

RecSource now supports this. It is not possible to upload recs/times which cannot be verified from eol database.
< roopemies> horror and frustrating and can't play, sounds just like you
Beer battle winner 2014 and 2015

User avatar
totem
39mins club
Posts: 328
Joined: 26 Dec 2007, 14:04

Re: Elma Online API

Post by totem » 13 Jul 2011, 08:07

Could it be possible to make an entry point to download lev-rec, and/or current battle-last winning rec (at least retrieve corresponding URLs) ?
Tell me if 'm asking impossible/unrelated features

klisse
Kuski
Posts: 114
Joined: 29 May 2002, 08:03

Re: Elma Online API

Post by klisse » 13 Jul 2011, 12:08

I dont get how the rss generating works. My feed is always empty. Could someone post an example? One with internals and one with externals.

klisse
Kuski
Posts: 114
Joined: 29 May 2002, 08:03

Re: Elma Online API

Post by klisse » 13 Jul 2011, 12:19

klisse wrote:I dont get how the rss generating works. My feed is always empty. Could someone post an example? One with internals and one with externals.
Found internal01 on this url http://beta.elmaonline.net/rss/?makerss=1&levelid=2

User avatar
Kopaka
39mins club
Posts: 6473
Joined: 23 May 2002, 13:59
Team: LAME
Location: In a northern danish city beating YOUR record.
Contact:

Re: Elma Online API

Post by Kopaka » 13 Jul 2011, 13:49

Dunno if it's you klissse, but I can see some people have been putting filename (like: snaab101) as level id, this is NOT how you should do it. If you want snaab101 you search for it on eol site and look at the url http://beta.elmaonline.net/?s=stats&p=level&l=43329 and the last number after l= (43329) is the id that you should put into the code as levelid.

To get internals here is an array with the ids for internals.
$intid = array(1 => 2, 2 => 4, 3 => 5, 4 => 6, 5 => 7, 6 => 8, 7 => 9, 8 => 10, 9 => 15, 10 => 59, 11 => 78, 12 => 109, 13 => 139, 14 => 219, 15 => 71, 16 =>51, 17 => 165, 18 => 57, 19 => 128, 20 => 197, 21 => 43, 22 => 107, 23 => 98, 24 => 100, 25 => 175, 26 => 192, 27 => 38, 28 => 198, 29 => 31, 30 => 16, 31 => 18, 32 => 164, 33 => 66, 34 => 131, 35 => 156, 36 => 357, 37 => 45, 38 => 13, 39 => 408, 40 => 412, 41 => 24, 42 => 416, 43 => 415, 44 => 95, 45 => 29, 46 => 33, 47 => 46, 48 => 21, 49 => 52, 50 => 257, 51 => 135, 52 => 133, 53 => 413, 54 => 17);

So for example if you want apple harvest you give it levelid 17.
totem wrote:Could it be possible to make an entry point to download lev-rec, and/or current battle-last winning rec (at least retrieve corresponding URLs) ?
Tell me if 'm asking impossible/unrelated features
I think so, but not completely sure what you're saying. Like give it a levelname/id and it gives you the url back that will download the lev/rec for that level?

User avatar
totem
39mins club
Posts: 328
Joined: 26 Dec 2007, 14:04

Re: Elma Online API

Post by totem » 13 Jul 2011, 17:35

at least the possibility to give current battle lev URL, last battle lev URL, and last battle rec URL

epp
Kuski
Posts: 551
Joined: 19 Aug 2002, 16:54
Location: denmark

Re: Elma Online API

Post by epp » 22 Jul 2011, 12:29

Kopaka is the best \o/
Image ^_^

User avatar
ribot
Not banned
Posts: 2292
Joined: 19 May 2002, 16:20
Location: omnipresent fractal hologram
Contact:

Re: Elma Online API

Post by ribot » 3 Feb 2014, 22:43

I don't understand the usage of this. How is a program supposed to know the level id of a cup level? I can only do it by searching for the level on eol, and then copying the download link, and extract the id from the link.

(It's kind of strange to have an api for something that you have to do manually, if that is the only way.)

- ElmaWars http://zzz.ink/war - lauta
- Elma Title
- Elma 3D HD (RPG GAME, GAA nominee)
"leader status in the Elma against-the-system underground" - Abula

Post Reply