diff --git a/README.md b/README.md new file mode 100644 index 0000000..914169f --- /dev/null +++ b/README.md @@ -0,0 +1,75 @@ +# Skyapi, a Wrapper for Skycoin Api + +This wrapper is Auto generated by openapi-generator directly from `Skycoin Api` code for version v0.25.1. + +## Skyapi-Axios + +Generated using the typescript-axios generator. + +### Installation + +Navigate to the folder of your consuming project and run the following command. + +``` +npm install libsky-axios@0.25.1 --save +``` + +### Specific Node Address + +For use a specific node of Skycoin, you just need to create a instance of `DefaultApi` passing a `Configuration` instance and the node address: + +```js +// Load the skyapi-axios module +const skyapi_axios = require("libsky-axios"); + +// Define path to skycoin node +const basePath = 'https://node.skycoin.net'; + +// Create a default configuration class +let api_axios_config = new skyapi_axios.Configuration(); + +// Create API instance +let api_axios = new skyapi_axios.DefaultApi(api_axios_config, basePath); + +// Make a request for the version to the skycoin node +api_axios.version().then(result => { + //Log the response data field + console.log(`Response from skycoin node in ${basePath} using axios client: ${JSON.stringify(result.data)}`); +}); + +``` + +## Skyapi-Node + +Generated using the typescript-node generator. + +### Installation + +Navigate to the folder of your consuming project and run the following command. + +``` +npm install libsky-node@0.25.1 --save +``` + + +### Specific Node Address + +For use a specific node of Skycoin, you just need to create a instance of `DefaultApi` passing the node address: + +```js +// Load the skyapi-node module +const skyapi_node = require("libsky-node"); + +// Define path to skycoin node +const basePath = 'https://node.skycoin.net'; + +// Create API instance +let api_node = new skyapi_node.DefaultApi(basePath); + +// Make a request for the version to the skycoin node +api_node.version().then(result => { + //Log the response body field + console.log(`Response from skycoin node in ${basePath} using axios client: ${JSON.stringify(result.body)}`); +}); + +``` \ No newline at end of file