kwent / syno

Simple Node.js wrapper and CLI for Synology DSM REST API 5.x and 6.x.
http://kwent.github.io/syno
MIT License
319 stars 51 forks source link

Nodejs: syno.vs.listTVShows is not a function #38

Closed vanlooverenkoen closed 6 years ago

vanlooverenkoen commented 6 years ago

This causes a TypeError: syno.vs.listTVShows is not a function. What am I doing wrong? The documentation is not clear.

var Syno = require('syno');
    var syno = new Syno({
        protocol: 'https',
        host: 'server',
        port: '5001',
        account: 'Me',
        passwd: 'Password',
        apiVersion: '6.0.2'
    });
   syno.vs.listTVShows({}, function(data){
        console.log(data);
        return res.json({
            message: "Running Fine!"
        });
    });
kwent commented 6 years ago

Hi @vanlooverenkoen.

Could you try listTvShows. Notice the Tv and not TV.

Regards

vanlooverenkoen commented 6 years ago
    "code": 120,
    "errors": {
        "name": "library_id",
        "reason": "required"
    }
kwent commented 6 years ago

Looks like you need to pass a library_id parameter you can get via listLibraries probably.

kwent commented 6 years ago

Closing for inactivity