Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
8c04744
[skyapi] refs #8 - Create .gitignore file
Mar 29, 2019
34cd6f3
[skyapi] refs #8 - Add skycoin.v0.25.1.openapi.v2.yml file
Mar 29, 2019
179c241
[skyapi] refs #8 - Create the Makefile file
Mar 29, 2019
68c878a
[skyapi] refs #8 - Generate skyapi axios client
Mar 29, 2019
e01481c
[skyapi] refs #8 - Create base of the skyapi axios client tester
Mar 29, 2019
a202a22
[skyapi] refs #8 - Create rules to build the skyapi axios client
Mar 29, 2019
a9e7020
[skyapi] refs #8 - Create travis configuration file
Mar 29, 2019
3c70e6d
[skyapi] refs #8 - Use strict mode in the tester index.js
Mar 29, 2019
04764c4
[skyapi] refs #12 - Generate skyapi node client
Mar 29, 2019
11ed2d1
[skyapi] refs #12 - Add test for the node skycoin api
Mar 29, 2019
d7b8cd7
[skyapi] refs #12 - Add rules to Makefile to build the node skycoin api
Mar 29, 2019
812665a
[skyapi] refs #12 - Add configuration to the .travis.yml file to build
Mar 29, 2019
8e178d6
[skyapi] refs #14 - Create Dockerfile and .dockerignore files
Mar 30, 2019
70c7150
[skyapi] refs #14 - Fix some problems with Dockerfile.
Mar 30, 2019
adbc831
[skyapi] refs #14 - Add rules to create the docker image and run it
Apr 3, 2019
889510f
[skyapi] refs #14 - Add test to Travis configuration file
Apr 3, 2019
c5fd126
[skyapi] refs #14 - Fix error in Travis configuration file
Apr 3, 2019
251f471
[skyapi] - Add README file
Apr 3, 2019
b3d3ba8
[skyapi] refs #14 - Add nano and vim to the docker image
Apr 5, 2019
dd5f004
[skyapi] refs #8 - Relocate axios generated client and tester
Apr 8, 2019
340946c
[skyapi] refs #8 - Fix errors in Makefile and Travis configuration file
Apr 8, 2019
b2682d8
[skyapi] refs #8 - Fix broken dependencies
Apr 8, 2019
a0eff02
[skyapi] refs #8 - Remove innecesary openapi specification
Apr 8, 2019
80d74dd
[skyapi] refs #8 - Add test to axios API client using test frameworks
Apr 12, 2019
63bbf22
[skyapi] refs #8 - Fix dependencies in axios API tester
Apr 12, 2019
c2b40bd
[skyapi] refs #8 - Fix errors in axios API client tests
Apr 12, 2019
79a1026
[skyapi] refs #8 - Add nodejs version to Travis configuration file
Apr 12, 2019
79f451a
Merge branch 'cbermudez97_t8_generate_api_client_axios' into cbermude…
Apr 12, 2019
55e7c99
[skyapi] refs #12 - Relocate node generated client
Apr 12, 2019
128b864
[skyapi] refs #12 - Add test to node API client using test frameworks
Apr 12, 2019
5b59f4f
[skyapi] refs #12 - Modify Makefile to add rules to build and test node
Apr 12, 2019
307013b
[skyapi] refs #12 - Modify .gitignore file
Apr 12, 2019
292e667
Merge branch 'cbermudez_t12_generate_api_client_node' into cbermudez9…
Apr 12, 2019
778fe18
[skyapi] refs #14 - Update Dockerfile to work with the relocated clients
Apr 12, 2019
dbe61fc
[skyapi] refs #8 - Update the axios client test timeout
Apr 12, 2019
516f0e2
Merge branch 'cbermudez97_t8_generate_api_client_axios' into cbermude…
Apr 12, 2019
b7bbfae
[skyapi] refs #12 - Update the node client test timeout
Apr 12, 2019
5cc2b9b
Merge remote-tracking branch 'origin/cbermudez_t12_generate_api_clien…
Apr 12, 2019
eadbea7
[skyapi] refs #14 - Remove unnecessary rule in the Makefile
Apr 12, 2019
1b7f6e2
[skyapi] Add .PHONY to Makefile
Apr 12, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.idea/
.directory
tester/node_modules
tests/axios/node_modules
tests/node/node_modules
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: node_js

node_js:
- "10.15.1"

before_script:
- make install

script:
- make test
34 changes: 34 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.DEFAULT_GOAL := help
.PHONY: install test test-axios-client test-node-client build-axios-client build-node-client
.PHONY: build-node-tester build-axios-tester docker_build docker_run

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

install: build-axios-client build-node-client build-axios-tester build-node-tester ; ## Build all libraries and tester

test: test-axios-client test-node-client ; ## Test all clients

test-axios-client: ## Test axios client
(cd ./tests/axios/ && npm run test )

test-node-client: ## Test node client
(cd ./tests/node/ && npm run test )

build-axios-client: ## Build axios client
(cd ./lib/skyapi/axios/ && npm install && npm run build)

build-axios-tester: ## Build axios client tester
(cd ./tests/axios/ && npm install)

build-node-client: ## Build node client
(cd './lib/skyapi/node/' && npm install && npm run build)

build-node-tester: ## Build node client tester
(cd './tests/node/' && npm install)

docker_build: ## Build docker image skyapi/typescript
docker build -t skyapi/typescript -f ./docker/Dockerfile .

docker_run: ## Run docker image skyapi/typescript with name skyapi-typescript
docker run -v ${PWD}/tests:/skyapi-typescript/tests -it --name=skyapi-typescript skyapi/typescript
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 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)}`);
});

```
1 change: 1 addition & 0 deletions docker/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*/node_modules
15 changes: 15 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM node

WORKDIR /skyapi-typescript

COPY lib/skyapi/axios/ ./lib/skyapi/axios/

COPY lib/skyapi/node/ ./lib/skyapi/node/

RUN (cd ./lib/skyapi/axios/ && npm install && npm run build )

RUN (cd ./lib/skyapi/node/ && npm install && npm run build )

RUN apt-get update -y && apt-get install vim -y && apt-get install nano -y

CMD ["bash"]
3 changes: 3 additions & 0 deletions lib/skyapi/axios/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
wwwroot/*.js
node_modules
typings
23 changes: 23 additions & 0 deletions lib/skyapi/axios/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
1 change: 1 addition & 0 deletions lib/skyapi/axios/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.0.0-beta2
45 changes: 45 additions & 0 deletions lib/skyapi/axios/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## libsky-axios@0.25.1

This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:

Environment
* Node.js
* Webpack
* Browserify

Language level
* ES5 - you must have a Promises/A+ library installed
* ES6

Module system
* CommonJS
* ES6 module system

It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html))

### Building

To build and compile the typescript sources to javascript use:
```
npm install
npm run build
```

### Publishing

First build the package then run ```npm publish```

### Consuming

navigate to the folder of your consuming project and run one of the following commands.

_published:_

```
npm install libsky-axios@0.25.1 --save
```

_unPublished (not recommended):_

```
npm install PATH_TO_GENERATED_PACKAGE --save
Loading