1.0.2 • Published 8 years ago

tasker-client v1.0.2

Weekly downloads
2
License
MIT
Repository
-
Last release
8 years ago

tasker-client

tasker-client is Node.JS implementation of client for tasker-server

Example

const exec = require('child_process').exec;

var client = require("tasker-client")({
	GATE: "http://localhost:3000/gate",
	KEYS: "home|laptop"
});

client.onMessage(function(message){
	if(message.action == "nextSong"){
		exec('playerctl next', (err, stdout, stderr) => {});
	}

	if(message.action == "pauseSong"){
		exec('playerctl pause', (err, stdout, stderr) => {});
	}

	if(message.action == "playSong"){
		exec('playerctl play', (err, stdout, stderr) => {});
	}
});
1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago