Skip to content

Automatic Javascript API #4

paniq opened this Issue Feb 10, 2013 · 2 comments

2 participants

paniq commented Feb 10, 2013

It would be amazing if flask-jsonrpc could auto-serve (potentially jQuery-based) Javascript classes generated from the registered methods, as a script that can be easily loaded by HTML in a browser. As it is I would still have to write the browser client part of the transaction.

Cenobit Technologies member

Great ideia!

It seems part of the issues #3, naturally when this is ready, large part of this feature will be ready.

Separating it into an API Javascript where user could use such,

var api = API('http://localhost:5000/api');
    .sucess(function(data) {
        // data = {
        //    'jsonrpc': '2.0', 
        //    'id': '91bce374-462f-11e2-af55-f0bf97588c3b', 
        //    'result': 'Welcome to Flask JSON-RPC'
        // }
        // do something ...
    .error(function(data) {
        // do something ...


Cenobit Technologies member

Instead of adding this functionality to the package, I created an example that you can follow from it.


I have helped.

@nycholas nycholas added a commit that referenced this issue Feb 11, 2013
@nycholas nycholas Added example HRX, #4 15929bc
@nycholas nycholas closed this Jun 19, 2013
@nycholas nycholas added the question label Mar 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.