https://github.com/lockblock-dev/crypto-idle-miner.js
A JavaScript library for interacting with the Crypto Idle Miner API
https://github.com/lockblock-dev/crypto-idle-miner.js
api crypto crypto-idle-miner hora-games
Last synced: 6 months ago
JSON representation
A JavaScript library for interacting with the Crypto Idle Miner API
- Host: GitHub
- URL: https://github.com/lockblock-dev/crypto-idle-miner.js
- Owner: LockBlock-dev
- License: mit
- Created: 2021-06-02T11:42:43.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-01T21:18:16.000Z (almost 3 years ago)
- Last Synced: 2023-11-24T16:09:52.344Z (about 2 years ago)
- Topics: api, crypto, crypto-idle-miner, hora-games
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/crypto-idle-miner.js
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Crypto Idle Miner.js
[](https://www.npmjs.com/package/axios)
[](https://github.com/LockBlock-dev/crypto-idle-miner.js/stargazers) 
crypto-idle-miner.js is a Node.js module that allows you to easily interact with the Hora Games API.
• Promise based
• Performant
• 100% coverage of the Hora Games API
• Only available library at this time
## Installation
• Download [NPM](https://www.npmjs.com/get-npm) and [NodeJS](https://nodejs.org)
With GitHub :
• Download the project or clone it
• Go to the crypto-idle-miner.js folder and do `npm install`
• Require the [index.js](/index.js)
With NPM :
• Download the project
• Do `npm install crypto-idle-miner.js`
• Require the library
## Documentation
See the [API documentation](/API.md) for list of methods and properties.
## Example usage
### How to get your token
```js
const { Client } = require("crypto-idle-miner.js")
const client = new Client()
client.authenticate()
```
This will runs a tiny tool in your console to help you get your account token.
### Using the library
```js
const { Client } = require("crypto-idle-miner.js")
const client = new Client("token")
client.user().then(data => {
console.log(data)
})
//OR
const myFunc = async () => {
const data = await client.user()
console.log(data)
}
myFunc()
```
The library is async, be sure to use [async functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function#syntax) or [.then()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/then#syntax)
## Credits
[Hora Games API](https://cryptoidleminer.com/)
## Copyright
See the [license](/LICENSE)