Skip to content
API Яндекс Диска на Node.js
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
test
.gitignore
README.md
index.js
package.json

README.md

Yandex disk api for Node.js

Installation

npm install

Using

var YaDiskAPI = require('yadisk-api'),
    mydisk = new YaDiskAPI({
        login: "mylogin@yandex.ru",
        password: "mypassword"
    }); // or your token

var fs = require('vow-fs'); // for example.
mydisk.get('/myfile').then(function (params) {
    fs.write('docs/myfile', params.data, 'binary').always(function () {
        console.log('fs.write', arguments);
    });
});

API methods

  • get (pathname) : promise
  • put (pathname, bug) : promise
  • delete (filename) : promise
  • move (from, to) : promise
  • copy (originalPath, newPath) : promise
  • mkcol (dirname) : promise. — Create dir
  • readDir (path) : Array
  • getProperty (path, [property]) : Array or string
  • setProperty (path, property, value) : promise
  • publish (filename) : String (URL)
  • unpublish (filename): promise
Something went wrong with that request. Please try again.