CL Adaptor to convert XML API's to JSON
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
adaptor
.gitignore
Dockerfile
README.md

README.md

XML to JSON CL Adaptor

This adaptor allows for converting of XML API's into JSON. This allows ChainLink nodes to use API's which use XML as a markup. It's built in Go using go-json-rest.

Dependencies

To be able to run this external adaptor, you need Docker installed.

Run the Adaptor

This adaptor is published on the public docker hub, so you just need to run the two following commands:

docker pull linkpoolio/xml-cl-ea
docker run -t -p 8080:8080 linkpoolio/xml-cl-ea

Using the Adaptor

To ensure that the adaptor is working properly, the following call:

http://localhost:8080/xmltojson?endpoint=http://webservices.nextbus.com/service/publicXMLFeed?command=agencyList

Should result in something similar to the following:

{
"body": {
        "-copyright": "All data copyright agencies listed below and NextBus Inc 2018.",
        "agency": [
            {
                "-tag": "string",
                "-title": "string",
                "-shortTitle": "string",
                "-regionTitle": "string"
            }
        ]
    }
}

Development

To run the external adaptor, clone the repo and run the following commands:

    go get

To run the unit tests, run the following:

    go test

Contributions

Any contributions are welcome.

Created by the LinkPool Team