- Joined
- Aug 15, 2018
- Messages
- 5
Is it expected that `/follows` returns a map with follow IDs as keys and not an array?
{server}{hash}/{page}
saver={1/true/on/yes}
server
saver
{server}{hash}/{page_name}
server
/api/v2/manga/{id}?include=chapters
"groups":[1,2,3]
"groups":[{"id":1},{"id":2},{"id":3}]
/api/v2/chapter/{id}
"groups":[{"id":1,"name":"g1"},"id":2,"name":"g2"},"id":3,"name":"g3"}]
The reason is PHP's FILTER_VALIDATE_BOOLEAN
For the proper v5 site's API, yes, we do have one. More importantly, we'll be issuing API keys and all that cool stuff. Not going to bother writing a proper token system for this one, though.2. Any plans to change the API auth to something like a token?
I ran into it myself rewriting the reader and I agree I fucked up there, but unserializing it isn't really a huge issue (even if it is a bit ugly) because the manga endpoint still has@nonindustrial posted:
I've been working with v2 of the API and I've discovered an inconsistency related to the structure/datatype on the chapter.groups{} object.
data.groups{}
Not really, that's another PHP fuckup that I overlooked. Doesn't really matter though, won't change.@UnlikelyChopshopNacho posted:
Is it expected that `/follows` returns a map with follow IDs as keys and not an array?
Ah, so just a documentation not a technical issue. I'd suggest changing/clarifying that 0 is false and 1 is true. Good docs are important after all.The reason is PHP's FILTER_VALIDATE_BOOLEAN
First: An API-Key is a token, but that's nitpicking on my side.For the proper v5 site's API, yes, we do have one. More importantly, we'll be issuing API keys and all that cool stuff. Not going to bother writing a proper token system for this one, though.
That'd be great. The end user really only needs either the data or an error message. Additional information (status-code, HTTP version, encode, etc.) can (and should be) sent via headers.Otherwise, v5 API should follow the jsonapi spec.
That might be, they should still return the proper error codes. A new programmer wouldn't know that they belong to v1 (I didn't know before you told me) and as always you have to factor in human error and gracefully handle malformed URLs. Once I had the issue that I didn't terminate my base URL (mangadex.org/api/) with a trailing slash and the URL lib replaced api with v2, thus resulting in mangedex.org/v2/manga. Now that's an easy spot, but as we all know PICNIC is the word and users are dumb in what they enter.All /api/ routes outside of /api/v2/* are part of the v1 API. Never mind them.
Whether it's -1 or -3 is pretty doesn't really matter, I'm not aware of any lib that doesn't handle both. Nice to know it's on the agenda regardless.3. I'm very aware, we'll use ISO639 (most likely -3) for v5.
That comment was more meant in the direction of: If you're using something like NGINX, Haproxy, etc. you're good to go. The problem is, you're stuck with PHP, which is only half the speed of drogon or actix.🙄 But yeah... PHP the only language where 0 == "true" does in fact equal to true and true == "foobar" == 0 != true 🤮"Any proper webserver can handle this" is the issue here.
Naww, it's a documentation issue on your end. I as a programmer don't know that you're using PHP, nor am I interested in it, that's the whole reason for using an API.If you think it's a documentation issue, take it up with them lol.
Good, that will cut my parsing library in half. Not that it's long in the first place... Rust takes away all the heavy lifting with speeds comparable to C++. Nice.And yeah, OAuth for v5 is the plan.
It's been a while since I did serious web development but that might actually the page slower. However, take that with a grain of salt, it's been half a decade.The whole site is going to be an API driven SPA anyway