Connects to an Avid iNews server and allows operations over FTP
var Inews = require('inews');
Will not connect unless a function that requires the connection (eg: cwd, list) is called
var conn = Inews({
'host': "inews-hostname",
'user': "inews-username",
'password': "inews-password"
});
Connect with backup servers
var conn = Inews({
'hosts': ["inews-hostname-a", "inews-hostname-b", "inews-hostname-c"],
'user': "inews-username",
'password': "inews-password"
});
conn.list("YOUR.QUEUE.HERE", function(error, dirList) {
if(!error) {
dirList.forEach(function(story) {
console.log(story.file);
}
}
});
var inewsQueue = "YOUR.QUEUE.HERE";
conn.list(inewsQueue, function(error, dirList) {
if(!error) {
dirList.forEach(function(storyFile) {
conn.story(inewsQueue, storyFile.file, function(error, storyDetails) {
console.log(error, storyDetails);
});
}
}
});
var inewsQueue = "YOUR.QUEUE.HERE";
conn.list(inewsQueue, function(error, dirList) {
if(!error) {
dirList.forEach(function(storyFile) {
conn.storyNsml(inewsQueue, storyFile.file, function(error, storyNsml) {
console.log(error, storyNsml);
});
}
}
});