All API endpoints are accessed via:
https://www.fab.com/i/
var child_process = require("child_process"); | |
const http = require('http'); | |
function getFarmingSummary() | |
{ | |
let data = child_process.execSync("cd /root/chia && . ./activate && chia farm summary").toString(); | |
let farmingStatus = data.match(/Farming status\: (?<Data>(.*))/); | |
let totalChiaFarmed = data.match(/Total chia farmed\: (?<Data>(.*))/); | |
let userTransactionFees = data.match(/User transaction fees\: (?<Data>(.*))/); | |
let blockRewards = data.match(/Block rewards\: (?<Data>(.*))/); |
// Gulp Task | |
gulp.task("compile:source", function(done) { | |
gutil.log(gutil.colors.yellow("[Typescript]"), gutil.colors.magenta('Transpiling Source')); | |
var tsProject = ts.createProject('tsconfig.json', { | |
typescript: require('typescript'), | |
}); | |
gulp.src("source/**/*") | |
.pipe(tsProject()) | |
.pipe(tsimport(tsProject.config.compilerOptions)) |
import { Injectable } from '@angular/core'; | |
import { Http } from '@angular/http'; | |
import { Config } from '../Config'; | |
import { Observable } from 'rxjs/Observable'; | |
import 'rxjs/Rx'; | |
@Injectable() | |
export class Request { | |
constructor(public http: Http) |