npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

letvcloud

v0.3.0

Published

LetvCloud SDK for Node.js. 乐视云视频SDK

Downloads

12

Readme

LetvCloud

LetvCloud SDK for Node.js. 乐视云视频SDK

Build Status Dependency Status

关于

基于乐视云视频2.0接口,详细文档查看

安装

你可以从 npm 进行安装

npm install letvcloud -save

也可以从 Github 进行下载安装

$ git clone https://github.com/daysv/LetvCloud.git

使用

引入SDK

var letvcloud=require('letvcloud');

配置 letvcloud()

设置全局参数 user_unique 和 secret_key。

letvcloud({
    user_unique: '----------',
    secret_key: '----------'
});

视频管理

视频上传初始化

功能描述:视频上传前调用,获取正式上传时需要的一些信息 应用参数说明:

letvcloud.video.upload.init({video_name:name},function(err,data){
    console.log(data);
})

视频上传(web 方式)

功能描述:上传视频

letvcloud.video.upload.web('my video','./1.mp4',function(err,data){
    console.log(data);
});

视频信息更新

功能描述:编辑单个视频的相关信息 应用参数说明:

letvcloud.video.update({video_id:'9342824',video_name:'newName'},function(err,data){
    console.log(data);
});

获取视频列表

功能描述:获取视频列表信息 应用参数说明:

letvcloud.video.list(function (err, data) {
    console.log(data);
});
//或者
letvcloud.video.list({index:2},function (err, data) {
    console.log(data);
});

获取单个视频信息

功能描述:获取单个视频的详细信息 应用参数说明:

letvcloud.video.get({video_id: '9342824'}, function (err, data) {
    console.log(data);
});

视频删除

功能描述:删除视频 应用参数说明:

letvcloud.video.del({video_id: '9342824'}, function (err, data) {
    console.log(data);
});

视频批量删除

功能描述:批量删除视频 应用参数说明:

letvcloud.video.del.batch({video_id: '9342824-9347690'}, function (err, data) {
    console.log(data);
});

视频暂停

功能描述:对播放正常的视频进行暂停操作 应用参数说明:

letvcloud.video.pause({video_id: '9347690'}, function (err, data) {
    console.log(data);
});

视频恢复

功能描述:对播放正常的视频进行暂停操作 应用参数说明:

letvcloud.video.restore({video_id: '9347690'}, function (err, data) {
    console.log(data);
});

截图管理

获取视频截图

功能描述:获取视频截图 应用参数说明:

letvcloud.image.get({video_id: '9347690', size: '100_100'}, function (err, data) {
    console.log(data);
});

数据统计

视频小时数据

功能描述:获取以小时为单位的视频数据 应用参数说明:

letvcloud.data.video.hour({date: '2014-03-03'}, function (err, data) {
    console.log(data);
});

视频天数据

功能描述:获取以天为单位的视频数据 应用参数说明:

letvcloud.data.video.date({start_date: '2014-03-03', end_date: '2014-03-04'}, function (err, data) {
    console.log(data);
});

所有数据

功能描述:获取以天为单位的所有数据 应用参数说明:

letvcloud.data.total.date({start_date: '2014-03-03', end_date: '2014-03-04'}, function (err, data) {
    console.log(data);
});

License

MIT