Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Maintenance & Feedback » Site and Forum Rules, Questions & Feedback

Is there a JSON api that returns all levels and level details for a specific level?

Darkhog Darkhog's Avatar

JCF Member

Joined: May 2012

Posts: 227

Darkhog is notorious for his worthless posts

Nov 30, 2017, 03:09 PM
Darkhog is offline
Reply With Quote
Is there a JSON api that returns all levels and level details for a specific level?

I want to make a launcher/level manager with an option to download and unpack levels automatically so people won't need to waste their time with unzipping them manually or (in the case of people who play/review a lot of levels) shufling levels around because home cooked levels list got full again.
__________________
Code:
    .──.
   │O_O │
   ││_╱ │
  ╱╱   │╲
 (|▔╲  │ )
╱'╲_▔ _╱`╲
╲___) (___╱  TUX LOVES YOU.
Violet CLM Violet CLM's Avatar

JCF Éminence Grise

Joined: Mar 2001

Posts: 10,991

Violet CLM has disabled reputation

Nov 30, 2017, 03:52 PM
Violet CLM is offline
Reply With Quote
(Unrelated to your main question, but I wanted to say that the home cooked levels list does not have a length limit in JJ2+.)
__________________
Darkhog Darkhog's Avatar

JCF Member

Joined: May 2012

Posts: 227

Darkhog is notorious for his worthless posts

Nov 30, 2017, 03:58 PM
Darkhog is offline
Reply With Quote
(good to know, however there are people playing on vanilla who have to deal with it)
__________________
Code:
    .──.
   │O_O │
   ││_╱ │
  ╱╱   │╲
 (|▔╲  │ )
╱'╲_▔ _╱`╲
╲___) (___╱  TUX LOVES YOU.
Stijn Stijn's Avatar

Administrator

Joined: Mar 2001

Posts: 6,964

Stijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to behold

Nov 30, 2017, 05:31 PM
Stijn is offline
Reply With Quote
Here's a PHP file that does what you want as far as the "level details for a specific level" part is concerned. I ripped it from Jazz2Online's source code and it's eight years old so it may have some ideosyncracies and leftover functionality you don't need, but it works and you should be able to adapt it for your needs, or port it to a language you're comfortable with.

https://gist.github.com/stijnstijn/d...5e9ed29d68ceb1

EDIT: Oh, you mean for J2O? No, there's no such thing, but it's not a bad idea. I might add something like that at some point.

Last edited by Stijn; Nov 30, 2017 at 05:44 PM.
Darkhog Darkhog's Avatar

JCF Member

Joined: May 2012

Posts: 227

Darkhog is notorious for his worthless posts

Nov 30, 2017, 06:38 PM
Darkhog is offline
Reply With Quote
Yeah, all I really need is some PHP file that spits the same info as level listings/level pages (so 2 files, actually), but as a plain JSON so I can then parse it and show in a launcher that allows for automatic level downloads. You'd still need to go to J2O to upload/rate levels, but it would make easier to just download levels themselves and then play them as you'd be able to launch Jazz 2 directly from manager/downloader. But for that I need that API. I could write something that would scrub info from HTML, but it would break on every site change and it would be a messy code anyway.
__________________
Code:
    .──.
   │O_O │
   ││_╱ │
  ╱╱   │╲
 (|▔╲  │ )
╱'╲_▔ _╱`╲
╲___) (___╱  TUX LOVES YOU.
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT -8. The time now is 08:45 AM.