Skip to content

Commit

Permalink
Initial release. Full API functionality + caching
Browse files Browse the repository at this point in the history
  • Loading branch information
NeutronicMC committed Jun 20, 2020
1 parent 87ac077 commit 274549d
Show file tree
Hide file tree
Showing 11 changed files with 7,353 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/.idea/
node_modules
/lib
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 120,
"trailingComma": "all",
"singleQuote": true
}
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# hive-tools-wrapper
Hive Tools Wrapper
=========
Advanced Hive Bedrock API wrapper with caching.

## Installation
`npm install hive-tools-wrapper`

## Getting started
*Work in progress.*
```js
import HiveApi from "hive-tools-wrapper"

// Make a new HiveApi instance, with a 300 second cache.
let api = new HiveApi(300)

// Get player data from the Hive API.
api.getAllTimePlayerStatistics("wars", "NeutronicMC").then((response) => {
// Return the all-time win count for NeutronicMC.
console.log(response.victories);
});
```

## Tests

`npm test`
7 changes: 7 additions & 0 deletions jestconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"transform": {
"^.+\\.(t|j)sx?$": "ts-jest"
},
"testRegex": "(/test/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
}
Loading

0 comments on commit 274549d

Please sign in to comment.