
Lipi Lekhika API
Integrate Lipi Lekhika with your Websites and projects
Add to Websites
To add Lipi Lekhika to your website first include the script by :
<script src="https://cdn.jsdelivr.net/gh/ofsfobnelip/lipi/lipilekhika.min.js"></script>
and initialize
var lipi = lipi_lekhika();
The Elements in which you want Lipi Lekhika to work add the class Lipi-LekhikA.
Configurations :-
-
lipi-lekhika :- This is a attribute of element which can be on or off.
-
lekhan-sahayika :- This is a attribute of element which can be on or off.
-
lipi-lang :- This is a attribute of element which has the name of The Script to be used. After changing this attribute call lipi.k.load_lang(name).
See a CodePen Example Here.
Script Converter
Lipi Lekhika also offers a script conversion client side based API
Before Converting Scripts make Sure that you load the intended script by using
lipi.k.load_lang(name); // This returns a promise
Then Use
lipi.parivartak(val, from, to); // This returns the converted text
HTTPS API
Lipi Lekhika also provides an online Script Conversion api.
URL :- https://api.lipilekhika.com
Request Type :- GET or POST(Recommended)
1st Method (Recommended)
In Body or in URL arguments :-
{
"from": from,
"to": to,
"text": text
}
Response is text with status 200.
2nd Method
url prefix = /from/to
In Body or in URL arguments :-
{
"text": text
}
Response is text with status 200.
3rd Method
url prefix = /from/to/text
Response is text with status 200.
The size of text sent should not exceed 500kb.
Example :- https://api.lipilekhika.com/en/hi/namaskAram
An example of API Usage also here