Skip to content

jonathanroze/Synology-NodeJS-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synology-NodeJS-API

A NodeJS API to communicate with your Synology NAS

You can :

  • Login and logout to your Synology NAS
  • Communicate with DownloadCenter application (Go to wiki for more information)

Installation

npm install synology-api

Create your Synology Object

var syno = new Syno(
    protocol = "HTTP",
    address = "192.168.0.0",
    port = "5000",
    username = "admin",
    password = "password",
    debug = true);

Now, you can get all tasks from your Synology Nas like that

syno.Auth.Connect().then(function(value) {
    console.log("Your are connected!");

    syno.DS.getTasks().then(function(value) {

        console.log("Success : " + value.Success)

        //Get your tasks
        for(var task in value.Tasks){
            console.log(value.Tasks[task].id)
        }



    }, function(reason) {

        console.log("Error : " + reason.Message)

    })

}, function(reason) {
    console.log("Error : " + reason.Message);

});

And when you do your business, logout :-)

data.Auth.Logout().then(function(data){
      console.log("You're log out")
  },function(reason){
          console.log("You're not log out")  
  });

For documentation go to https://github.com/Clowning/Synology-NodeJS-API/wiki

About

A NodeJS API to communicate with your Synology NAS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published