API documentation question

:partying_face:

Wonderful! Thanks so much.

A couple questions about the data:

  1. What is “enumber”?
  2. “resembling”?
  3. When will “to/biblio” be filled in?
1 Like

Hi, I checked the relevant code,

  1. resembling: This attribute indicates whether the relationship edge represents a resemblance or similarity between two nodes. If resembling is True, it means the edge represents a resemblance between the nodes. If resembling is False, it means the edge represents a complete relationship between the nodes.

  2. number: This attribute represents the number or order of the relationship edge. It is used to differentiate multiple edges connecting the same pair of nodes. By using the number attribute, the edges can be distinguished based on their order or sequence.

In summary, resembling indicates the resemblance of the relationship edge, while number represents the order or sequence of the edge.

1 Like

截图 2023-08-03 14-14-02

https://suttacentral.net/kf10?view=normal&lang=en

The information displayed in the picture is the biblio information.

2 Likes

Hi all, your resident eternal JavaScript novice here. I’m just dipping my toes into the APIs. I’ve successfully managed to get suttaplex info. I would also like to get the information from the ‘guides’ through the API. Is that possible? So I’m looking for a way to get the text (html, markdown or whatever) that is shown on this page: A Guide To Linked Discourses—SuttaCentral. If it is split into sections, then all the better. Many thanks

I don’t think there is an api for that. These are called “static pages” in SC lingo. They are created (I’m guessing) with Lit elements. Because they are localized, the text content is stored separately.

Here’s a super cool trick… Open the Network tab in developer tools ans click each of the requests to see what they are. If you do that you can find the request/response that sends the content:

It’s just a direct request of the file, not through an api.

The “template” with the html is here: https://github.com/suttacentral/suttacentral/blob/main/client/elements/static/sc-static-sn-guide-sujato.js

If you use the developer tools above on a sutta page, you can see an actual api request.

2 Likes

That is super cool. Thanks so much. I love this community!

1 Like