0.1.2 • Published 9 years ago

yandex-photos v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

yandex-photos NPM version Build Status Dependency Status

Client for Yandex Photos service API.

Usage

var fs = require('fs');

var photos = require('yandex-photos').client(token);

photos.upload(fs.createReadStream('picture.jpg'), {
    album: 'urn:yandex:fotki:alekna:album:197816'
}, function (err, result) {
    console.log(result);
});

API

client(user, oauth, options)

Creates client to Yandex Photos API.

user

Type: String
Contains user name of oauth token.

oauth

Type: String
Contains oauth token from OAuth authorization procedure.

options
api

Type: String
Default: api-fotki.yandex.ru/api

Address of Yandex Photos API.

protocol

Type: String
Default: http

client.upload(file, options, cb)

Uploads photo to Yandex Photos.

file

Type: Buffer or Stream
Contents of photo.

options

Type: Object
Options for upload.

options.album

Type: String

options.title

Type: String

options.summary

Type: String

License

MIT (c) 2014 Vsevolod Strukchinsky

0.1.2

9 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago