GithubHelp home page GithubHelp logo

me-api's People

Contributors

lord63 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mynameiscosmo

me-api's Issues

About the medium middleware

Currently, when we use the medium middleware, we can directly use it. But actually medium has its own API, you can read the docs here: medium-api-docs.

I wonder whether we should change to use the API or not, benefits are:

  • should get a much readable response
  • current medium middleware is a little weired when parsing the response: the first 16 characters are

])}while(1);

thus we can't reuse our NoNeedAuthView.

Make the data part in the config file flat?

currently the generate script should support nested structure in config file, but why not flatten it?

def config_module(module):
    """Config module from user input."""
    default_conf = TEMPLATE[module]
    default_conf['path'] = get_input(default_conf['path'])
    for key, value in default_conf['data'].items():
        if isinstance(value, dict):
            for inner_key, inner_value in value.items():
                default_conf['data'][key][inner_key] = get_input(inner_value)
        else:
            default_conf['data'][key] = get_input(value)
    return default_conf

Here is an example of nested:

{
    "modules": {
        "douban": {
            "path": "/douban",
            "data": {
                "sectet": {
                    "client_secret": "aaa",
                    "access_token": "bbb",
                    "client_id": "ccc"
                }
            }
        }
    }
}

or just flatten it:

{
    "modules": {
        "douban": {
            "path": "/douban", 
            "data": {
                "client_secret": "aaa", 
                "access_token": "bbb", 
                "client_id": "ccc"
            }
        }
    }
}

Show the original json

Currently I use flask.jsonify to return the json.

E.g. the github module:

return jsonify(github=response.json())

you can see that I add a github key for the json, maybe we should just use the original json.

Pull requests are welcome.

Integrate more services

me_api is still very young and at its very early stage. If you have some services that you want to integrate with me_api, leave your comment here. Or it's better if you can send me a pull request :) Read the document here: Develop a new middleware if you're ready to build it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.