anytv-node-youku-uploader
A simple nodejs library for youku authentication and upload.
Install
npm install anytv-node-youku-uploader --save
Features
- Login with Youku OAuth2
- Upload Videos
Usage
Opening a connection
On your index.js / server.js / app.js, register your database using a key.
; const config = client_id: 'YOUR CLIENT ID' client_secret: 'YOUR CLIENT SECRET' redirect_uri: 'YOUR REDIRECT URI' slice_size: 4096 //optional; //get auth classconst auth = Youkuauth;//initialize authconst youku = config; //authorize a user//1. get auth urlconst authurl = youku;//2. redirect user to auth url//3. get access token, accepts `authorization_code` and `refresh_token` as grant typeyouku;
Documentation
to follow
Contributing
Install the tools needed:
npm install babel -gnpm install esdoc -gnpm install mocha -gnpm install --dev
To compile the ES6 source code to ES5:
babel src --watch --out-dir lib
To generate the docs:
npm run docs
Running test
npm test
Code coverage
npm run coverage
Then open coverage/lcov-report/index.html.
License
MIT