Skip to content

6sotok/yadisk-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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

About

API Яндекс Диска на Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published