This is a self-hosting tripitaka API server. You can use this server for your tripitaka applications.
- Implementing full tripitaka
- Translating to all locales
Use your browser or post mant to access these URLs. You can get a JSON result after a successful call.
We can get the main menu items by accessing below URL.
Request:-
http://localhost:5000/menu/si_LK
// si_LK is the locale code
Response:-
{
status: true,
data: [
{
id: "p1",
name: "විනයපිටක",
parent: true,
childCount: 5
},
...
]
}
And please provide a path to access nested menus.
Request:-
http://localhost:5000/v1/menu/si_LK/p2/n2
// p2 and n2 are parent ids
Response:-
{
status: true,
data: {
name: "මජ්ඣිමනිකාය",
id: "n2",
parent: true,
childCount: 3,
childs: [
{
id: "b1",
name: "මූලපණ්ණාසපාළි",
parent: true,
childCount: 5
},
...
]
}
}
Please access below URL with your path to get the sutta contents.
Request:-
http://localhost:5000/v1/sutta/si_LK/p2/n2/b2/v2
Response:-
{
id: "p2_n2_b2_v2",
title: "භික්ඛුවග්ගො",
sections: [
{
title: "1. අම්බලට්ඨික රාහුලොවාද සූත්රය",
id: "p2_n2_b2_v2_s1",
paragraphs: [
{
number: "107",
content: "මා විසින් මෙසේ...",
id: "p2_n2_b2_v2_s1_p1"
},
...
],
endingText: "පළමුවෙනිවූ අම්බලට්ඨික රාහුලොවාද සූත්රය නිමි. (2-1)"
},
...
]
}
- Sinhala
- English
Use POEdit application to edit or create your translation files. Put your translation files in /data/locales/translations/<path-to-sutta>
folder.
- Install depedencies.
npm install
- Compile translation files.
npm run translate
- Watch your changes.
npm run start-dev
All contributions are welcome. Please help us to add your language to the above list and spread tripitaka.
Pitaka.lk - Winaya Pitaka (Sinhala)