Wrapper around Weboob to expose a HTTP API.

v1.md 3.0KB

Infotuyo/infotuyoob API v1 documentation

This is the documentation for the first version of the JSON API exposed by infotuyoob.

Basic notions

Weboob exports data according to “capabilities”, to abstract common features of websites. Each capability can export some items. Typically, CapDocument capability which abstracts bills can export Subscriptions, Bills, Documents (contracts etc), …

For a complete documentation of supported capabilities, see the infotuyoob doc about capabilities.

A “module” is a Weboob module, written for a specific website.

In the following, replace $SERVER_URI by your server base URL. For the default settings, it is localhost:7777.

GET /

List all the available API versions.

$ curl http://$SERVER_URI/

{
    "api": {
        "v1": "/api/v1"
    }
}

GET /api/v1

List all the available endpoints for this API version.

$ curl "http://$SERVER_URI/api/v1"

{
    "endpoints": {
        "Fetch data from a module": "/api/v1/modules/:module/fetch",
        "List all capabilities and fetchable items": "/api/v1/capabilities",
        "List all modules and configuration": "/api/v1/modules",
        "List configuration for a module": "/api/v1/modules/:module",
        "List fetchable items of a category": "/api/v1/capabilities/:capability",
        "Update modules": "/api/v1/modules/update"
    }
}

GET /api/v1/capabilities

List all the suported capabilities and their fetchable items.

$ curl "http://$SERVER_URI/api/v1/capabilities"

{
    "capabilities": {
        "CapDocument": [
            "Subscription",
            "Document",
            "Detail",
            "Bill",
            "History"
        ]
    }
}

GET /api/v1/capabilities/:capability

List all the fetchable items for the specified capability.

$ curl "http://$SERVER_URI/api/v1/capabilities/CapDocument"

{
    "capabilities": {
        "CapDocument": [
            "Subscription",
            "Document",
            "Detail",
            "Bill",
            "History"
        ]
    }
}

GET /api/v1/modules

List all the available modules, their descriptions and the configuration options you can pass them (required and optional ones).

$ curl http://$SERVER_URI/api/v1/modules

TODO

GET /api/v1/modules/:module

List all the description and the configuration options you can pass to the specified module (required and optional ones).

$ curl http://$SERVER_URI/api/v1/modules/freemobile

TODO

POST /api/v1/modules/:module/fetch

TODO

POST /api/v1/modules/:module/fetch/:capability

TODO

POST /api/v1/modules/:module/fetch/:capability/:item

TODO

GET /api/v1/modules/update

Update all available modules.

$ curl http://$SERVER_URI/api/v1/modules/update

GET /api/v1/modules/:module/update

Update specified module.

$ curl http://$SERVER_URI/api/v1/modules/freemobile/update