Skip to content

Commit

Permalink
added all examples, moved it into categories
Browse files Browse the repository at this point in the history
  • Loading branch information
SloRunner committed Sep 17, 2020
1 parent 8d375cb commit 049994d
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 31 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

[![Actions Status](https://github.com/SloRunner/ethermine-api/workflows/Node.js%20Package%20Publish/badge.svg)](https://github.com/SloRunner/ethermine-api/actions)

Api for ethermine interaction
Interact with ethermine and other API's provided by ethermine.com

Usage: See [examples](https://github.com/SloRunner/ethermine-api/tree/master/example)
32 changes: 32 additions & 0 deletions example/miner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const Ethermine = require('../src/index.js'); // use ethermine-api in production
const ethermine = new Ethermine();

let miner = "0x4bd46f005099d400768dc057c96a60180e891cf9";

ethermine.getMinerDashboard(function(err, data){
console.log(err, data)
})

ethermine.getMinerRounds(miner, function(err, data) {
console.log(err, data)
})

ethermine.getMinerHistory(miner, function(err, data) {
console.log(err, data)
})

ethermine.getMinerPayouts(miner, function(err, data) {
console.log(err, data)
})

ethermine.getMinerWorkers(miner, function(err, data) {
console.log(err, data)
})

ethermine.getMinerSettings(miner, function(err, data) {
console.log(err, data)
})

ethermine.getMinerCurrentStats(miner, function(err, data) {
console.log(err, data)
})
6 changes: 0 additions & 6 deletions example/miner/dashboard.js

This file was deleted.

18 changes: 18 additions & 0 deletions example/pool.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const Ethermine = require('../src/index.js'); // use ethermine-api in production
const ethermine = new Ethermine();

ethermine.getBlockHistory(function(err, data){
console.log(err, data)
})

ethermine.getNetworkStats(function(err, data){
console.log(err, data)
})

ethermine.getPoolStats(function(err, data){
console.log(err, data)
})

ethermine.getServersHistory(function(err, data){
console.log(err, data)
})
6 changes: 0 additions & 6 deletions example/pool/blockhistory.js

This file was deleted.

6 changes: 0 additions & 6 deletions example/pool/networkstats.js

This file was deleted.

6 changes: 0 additions & 6 deletions example/pool/poolstats.js

This file was deleted.

6 changes: 0 additions & 6 deletions example/pool/serverhistory.js

This file was deleted.

17 changes: 17 additions & 0 deletions example/worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const Ethermine = require('../src/index.js'); // use ethermine-api in production
const ethermine = new Ethermine();

let miner = "0x4bd46f005099d400768dc057c96a60180e891cf9";
let worker = "051";

ethermine.getMinerWorkers(miner, function(err,data){
console.log(err, data);
})

ethermine.getWorkerHistory(miner, worker, function(err, data){
console.log(err, data);
})

ethermine.getWorkerCurrentStats(miner, worker, function(err, data){
console.log(err,data);
})

0 comments on commit 049994d

Please sign in to comment.