nataraj: (0)
Swami Dhyan Nataraj ([personal profile] nataraj) wrote in [site community profile] dw_dev 2022-08-20 06:55 pm (UTC)

1) It actually is limited in the backend, but not well-described in the API at the moment, in part because I haven't figured out how I want to do pagination yet. I think the max entries it will return at once is either 20 or 50? Because yes, that'd be a terrible idea to return ALL entries.

Ok, let leave it the way it is for now. I hope there would be pagination in future, because it would be good for backuping purposes, at least.

2) That is a good idea! I hadn't actually considered if we store entries differently depending on the editor format, and I should check if we do.

I thought about it more, and what do you think about joining all content representation in one structure. Like:

"body" : {
"content" : "Some *text*",
"type" : "markdown",
"rendered" : "Some <i>text</i>"
} 

Or may be a bit more complex structure, if there can be more than two representation of the body.

So even in the old entry page, you can use the hacky way to get markdown, which iirc is to put '!markdown' on it's own line as the very first line of the entry, but you can also turn on the beta entry page at /beta (so http://www.momiji.hack.dreamwidth.net/beta on my dreamhack, for instance).

My beta (http://www.nataraj.hack.dreamwidth.net/beta) is empty:

We'll announce more testing opportunities in our official communities. Thank you.

There are no features currently available for beta testing.

That is why I asked. May be some options should be turned on in the config...

There is a LOT of code, unfortunately, which makes it hard to kind of give a tour, but for API stuff specifically, the routes are defined by a combo of yaml files in /api, Perl endpoint controllers in /cgi-bin/DW/Controller/API/REST, and TO_JSON methods in various object classes that define the JSON print format for that object. For entries specifically, the TO_JSON method is in /cgi-bin/LJ/Entry.pm

I'll try to explore the code. It will be low priority, but at least I will try to look at the code before asking questions :-)


Post a comment in response:

If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org