Skip to content

Commit

Permalink
Merge pull request #8 from jplomas/master
Browse files Browse the repository at this point in the history
Async code refactor & tests re-write
  • Loading branch information
jplomas committed Jul 24, 2020
2 parents b9ed5b8 + dc10182 commit 263cd2e
Show file tree
Hide file tree
Showing 9 changed files with 516 additions and 287 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
coverage/**
dist/**
dist/**
example.js
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ testnet.connect().then(() => {
})
```

make an API call:
make an API call (needs a node connection):

```javascript
testnet.api('GetStats').then((result) => {
Expand All @@ -53,12 +53,14 @@ var port = '19009'
var testnet = new QrlNode(ip, port)

testnet.connect().then(() => {
console.log(testnet.connection) // true if connection successful
})

testnet.api('GetStats').then((result) => {
console.log(result)
})
console.log(testnet.connection); // true if connection successful

// we can now start using the API
testnet.api('GetStats').then((result) => {
console.log(result);
});

});
```

## Development of this module
Expand Down
Loading

0 comments on commit 263cd2e

Please sign in to comment.