#Can the API return an actual JSON body? please.
1 messages ยท Page 1 of 1 (latest)
you're right, but it still doesn't stop you from parsing it to a json object?
it doesn't stop me but it should of been json by default ๐คฃ
and the api should include a bit more options for params
i'm just hoping this is temporary and isn't forever
@void pivot API is very much the last thing on the mind for the developers. I'm shocked they even decied to open this up as they said they weren't going to support it until after servers went community access.
I see thanks for clarfying i thought the same too until that got released
All good, you're not the only one that is waiting for API access let me assure you but after many talks with Oki over many months it's some time away yet.
i'm glad that's the case
is it possible to close threads?
since there's probably no reason for my rant to exist
i dont understand the issue
const response = await fetch(url);
const result = await response.json();
I use python not c++
THAT isn't even my point
i don't see a debate here when most sane people have their api return a json body not a text
response.json(content_type='') extra steps ๐คฎ
probably an oversight
welp i hope they notice then
i'm not sure if they respond to threads at all
probably busy people
Html is a valid restful response, and can be parsed like xml. Check out the HTMX project for some great essays on this topic. Htmx.org
Most things just parse it automatically, I didn't even notice it when I made www.battlebit.fun
I think the API should return the IP address of the servers, I don't see the purpose of it other than analytical if it can't facilitate third party server browsers?
export interface Server {
Name: string
Map: string
MapSize: string
Gamemode: string
Region: string
Players: number
QueuePlayers: number
MaxPlayers: number
Hz: number
DayNight: string
IsOfficial: boolean
HasPassword: boolean
AntiCheat: string
Build: string
}
Also the API is limited 3req/s
Nice site. Too bad there isnt any history data for playercount chart in api
it would probably get added alongside everything else later down the road
Did you make the site using js?
i mean i kinda understand why they wouldnt want to give the ip address of the servers cos of like ddosing and stuff
maybe they might give it. if direct connect ever becomes a thing?
uh wouldn't it be super easy
just to grab the ip's
by connecting???
yeh you can do that
connecting with the game client and getting the ip is very different from making an api call and pulling the entire list. No need to make shit easier for bad guys.
if someone was dedicated they definitely
would never have an issue grabbing server ips
directly from the game memory
but yeah i don't see any point of getting the ips unless we get the ability to connect to servers using em
Itโs an API who really cares for the contents, just be happy we have one.
i don't know what to say
it's a shitty api but i guess we reap what we sow
it's not even a REST api
๐ ๐ ๐ R.I.P Battlebit community 2023 - not even REST api ๐ ๐ ๐
Being valid doesn't make it any less cursed. Any sane developer wouldn't use html/xml for API in 2023
Op said it was a rest api, I just corrected him. I don't care whether it is rest or not
kk
maybe, but here the endpoint isn't
love
