-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API suggestions #6
Comments
The flask_restplus application is working locally. https://github.com/drdhaval2785/prakriya/blob/master/yourapplication.wsgi is the wsgi file |
Regarding point 2, I would leave it to the client side to do the transliteration. |
What was the problem? log kim avadat? https://github.com/kmadathil/sanskrit_parser/tree/master/wsgi ityapi pashyatu. You need to enable wsgi module, and enable the wsgi configuration |
Point 3 done. |
http://api.sanskritworld.in/#/default is where the swagger documentation of API is available. |
Point 1 and 2, I am not so sure whether they are more intuitive. |
Looks great! Regarding point 1Now, I don't know and have to guess what the expected encoding is. should I type gacCati or gachChati or gacCawi etc..? Now, that's where
Please note that REST API consumers in general are used to some conventions and best practices, which have been generally accepted for a reason. One should be wary of disregarding it without good reason (in other words, you should by default follow the convention, and expect users to demand that you don't rather than the other way round.) Regarding point 2.Regarding the output encoding though, atleast for http://api.sanskritworld.in/v0.0.1/jagAma/prakriya, which you claim is meant to be human readable - you should include the encoding=devanaagarii parameter. As it is, I find myself feeling the following:
Achieving this is quite simple - just use our indic_transliteration module and call sanscript. I can do it for you if you give me write permission here; and if dependencies are clear so that I can test it. |
New APIs for version 0.0.2. See documentation at https://api.sanskritworld.in/. Full data API - https://api.sanskritworld.in/v0.0.2/verbforms/slp1/jagAma?output_transliteration=devanagari (Recommended for UI development by @avinashvarna , as it has all possible info.) prakriya API - https://api.sanskritworld.in/v0.0.2/verbforms/slp1/jagAma/prakriya?output_transliteration=devanagari Rest two APIs would not be much of interest, as they are subset / modification of the earlier two. https://api.sanskritworld.in/v0.0.2/verbforms/slp1/jagAma/{argument}?output_transliteration=devanagari |
@avinashvarna You can tweak the output_transliteration parameter with other values and see if the data is returned in proper encoding or not. |
As per @vvasuki
You'd be following REST API conventions (google it) better and it would be clearer if the URI were http://api.sanskritworld.in/v0.0.1/tinantas/slp1/jagAma/prakriya
And you might have the API automatically produce the output in a desired encoding with query parameters of the type:
http://api.sanskritworld.in/v0.0.1/tinantas/slp1/jagAma/prakriya?encoding=devanaagarii
Further, you might want to publish the swagger API documentation (Example https://api.vedavaapi.org/scala/swagger/index.html#/grammarv1analyser/Analyse1 or https://api.vedavaapi.org/py/ullekhanam/docs#!/default/get_book_list ) for your API - just use flask-restplus library.
The text was updated successfully, but these errors were encountered: