Skip to content

Commit

Permalink
[skyapi] - Add README file
Browse files Browse the repository at this point in the history
  • Loading branch information
cbermudez97 committed Apr 3, 2019
1 parent c5fd126 commit 251f471
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 [email protected] --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 [email protected] --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)}`);
});

```

0 comments on commit 251f471

Please sign in to comment.