1.0.1 • Published 6 years ago

plagtool v1.0.1

Weekly downloads
28
License
ISC
Repository
-
Last release
6 years ago

Plagtoo API for NodeJS

Super simple to use

var plagtool = require('plagtool');
var client = new plagtool('login','pass');
client.batch(['put','get','post'], function(error, result){
	if(!error){
		res.send(result.getMessage());
	}
});

Here is an example of the query for sending the text for checking:

client.addTextForChecking(text,function(error, result){
	if(result){
		if(result.getData() == null) res.send(result.getMessage());
		var hash = result.getData();
		client.getTextStatus(hash, function(error, result){
				if(result.getData() == 100){
					client.getResult(hash, function(error, result){
						res.send(result.getData());
					});
				}			
		});
	}
	else{
		res.send(error.toString());
	}
});

To send text files for checking, use addFileForChecking method as below:

client.addFileForChecking('file_path', function(error, result){
	if(result){
		res.send(result.getMessage());
	}
});
1.0.1

6 years ago

1.0.0

6 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago