Skip to content

Commit

Permalink
fooobar
Browse files Browse the repository at this point in the history
  • Loading branch information
danjenkins committed Sep 25, 2013
1 parent c168ba5 commit 8c091dd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
16 changes: 7 additions & 9 deletions examples/example.js
Expand Up @@ -2,23 +2,21 @@ var Hylafax = require('../index');
var fs = require('fs');


//var hylafax = new Hylafax({host: 'barbara.holidayextras.local', port: 4559, username: 'node_faxer', password: 'n0D3HylAfaxUseR'/*, debug: true*/});
var hylafax = new Hylafax({host: '172.16.172.136', port: 4559, username: 'dan', password: 'password', debug: true});
var hylafax = new Hylafax({host: '127.0.0.1', port: 4559, username: 'username', password: 'password', debug: true});

hylafax.on('ready', function(){
console.log('READY');


//hylafax.loginAdmin('aDmiNn03ehyLafAx', function(err, res){

hylafax.loginAdmin('adminpass', function(err, res){

console.log('logged in as admin', err, res);

// hylafax.getStatus(function(){
// console.log('got status');
// })
hylafax.sendFax(fs.createReadStream('/git/node-hylafax-client/examples/foo.ps'), '01303768643', function(err, res){

hylafax.sendFax(fs.createReadStream('foo.ps'), '0123456789', function(err, res){
console.log('NO WOO!', err, res);
})
//hylafax.help('STOT', function(err, res){
Expand Down Expand Up @@ -48,7 +46,7 @@ process.once('SIGINT', function(){
//EXAMPLE OF SEND THROUGH SENDFAX

/*
sendfax -T1 -n -vv -i test -d 07976559930 /tmp/faxlog
sendfax -T1 -n -vv -i test -d 07976559930 /tmp/faxlog
Trying localhost (127.0.0.1) at port 4559...
Expand Down
11 changes: 4 additions & 7 deletions examples/status.js
@@ -1,19 +1,16 @@
var Hylafax = require('../index');
var fs = require('fs');


//var hylafax = new Hylafax({host: 'barbara.holidayextras.local', port: 4559, username: 'node_faxer', password: 'n0D3HylAfaxUseR'/*, debug: true*/});
var hylafax = new Hylafax({host: '192.168.233.128', port: 4559, username: 'dan', password: 'password', debug: true});
var hylafax = new Hylafax({host: '127.0.0.1', port: 4559, username: 'username', password: 'password', debug: true});

hylafax.on('ready', function(){
console.log('READY');


//hylafax.loginAdmin('aDmiNn03ehyLafAx', function(err, res){

hylafax.loginAdmin('adminpass', function(err, res){

console.log('logged in as admin', err, res);

hylafax.setJobFormat('%-4j|%3i|%1a|%6.6o|%-12.12e|%5P|%5D|%7z|%25.25s', function(err, data){
hylafax.getCompletedJobs(function(err, data){
console.log('got status', err, data);
Expand Down

0 comments on commit 8c091dd

Please sign in to comment.