nicolive
所属分类:网络编程
开发工具:CoffeeScript
文件大小:0KB
下载次数:0
上传日期:2017-02-12 17:24:42
上 传 者:
sh-1993
说明: 命令行注释查看器,
(Command Line Comment Viewer,)
文件列表:
.svg (1281, 2016-02-27)
.travis.yml (1186, 2016-02-27)
CHANGELOG.md (967, 2016-02-27)
nicolive (135, 2016-02-27)
package.json (1106, 2016-02-27)
src/ (0, 2016-02-27)
src/api.json (3066, 2016-02-27)
src/nicolive.coffee (637, 2016-02-27)
src/nicolive/ (0, 2016-02-27)
src/nicolive/cli.coffee (1378, 2016-02-27)
src/nicolive/comment.coffee (1682, 2016-02-27)
src/nicolive/create-stream.coffee (2450, 2016-02-27)
src/nicolive/fetch-nickname.coffee (590, 2016-02-27)
src/nicolive/get-player-status.coffee (1403, 2016-02-27)
src/nicolive/get-post-key.coffee (776, 2016-02-27)
src/nicolive/login.coffee (594, 2016-02-27)
src/nicolive/logout.coffee (289, 2016-02-27)
src/nicolive/ping.coffee (73, 2016-02-27)
src/nicolive/view.coffee (2698, 2016-02-27)
src/session.coffee (515, 2016-02-27)
test/ (0, 2016-02-27)
test/nicolive.spec.coffee (4378, 2016-02-27)
test/session.spec.coffee (685, 2016-02-27)
![icon](https://cdn.rawgit.com/59naga/nicolive/master/.svg) Node Nicolive
---
> Command line comment viewer
## Installation
```bash
$ npm install nicolive --global
$ nicolive -V
# 0.0.2
```
## CLI Usage
```bash
Usage: nicolive
[comment] [options...]
Commands:
logout Destroy session & Request to https://.../logout
help [cmd] display help for [cmd]
Options:
-h, --help output usage information
-V, --version output the version number
-f, --from [number] Get [0~1000] comment of past.
-m, --mail [command] Change [comment] command
-v, --verbose Output debug log.
```
```bash
$ nicolive nsen/hotaru --verbose
# Please authorization.
email: your@mail.address
password: ******
# Authorized.
# Request to http://live.nicovideo.jp/api/getplayerstatus/nsen/hotaru
# Player status { port: '2805',addr: 'omsg103.live.nicovideo.jp',title: 'Nsen - 蛍の光チャンネル',description: 'Nsenからの去り際に...',thread: '1431971701',version: '20061206',res_from: -5,user_id: '47972775',premium: '0',comment_count: '25',mail: '184' }
# Connect to http://omsg103.live.nicovideo.jp:2805/api/thread?thread=1431971701&version=20061206&res_from=-5
# Or static http://omsg103.live.nicovideo.jp:80/api/thread?thread=1431971701&version=20061206&res_from=-5
# Received raw [Nsen/vocaloid](http://live.nicovideo.jp/watch/nsen/vocaloid)
## API Usage
```bash
$ npm install nicolive --save
```
```js
var nicolive= require('nicolive');
nicolive.login('your@email.address','********',function(error,cookie){
if(error) throw error;
var live_id= 'lv218499873';
nicolive.view(live_id,function(error,viewer){
if(error) throw error;
viewer.on('handshaked',function(){
nicolive.comment('わこつ',{mail:'184'});
});
viewer.on('comment',function(comment){
console.log(comment.text);// わこつ
nicolive.logout(function(error){
if(error) throw error;
process.exit(0);
});
});
});
});
```
[DEMO: atom-shell(Electron) Application](https://github.com/59naga/edgy-comment-viewer)
## TEST
```bash
export LOGIN_ID=$(echo -n 'YOUR_MAILADDRESS' | base64)
export LOGIN_PW=$(echo -n 'YOUR_PASSWORD' | base64)
npm test
```
## 参考
* [niconicoのメッセージ(コメント)サーバーのタグや送り方の説明 2014-03-18 by hocomodashi][A]
* [ニコニコAPIリストwiki][B]
* [Nodejsでニコ生のコメビュを作る - Qiita][C]
* [node-nicovideo-api by Ragg-][X]
[A]: http://blog.goo.ne.jp/hocomodashi/e/3ef374ad09e79ed5c50f3584b3712d61
[B]: http://www59.atwiki.jp/nicoapi/
[C]: http://qiita.com/59naga/items/0a22e30f019aaef683e4
[X]: https://github.com/Ragg-/node-nicovideo-api
License
---
[MIT](http://59naga.mit-license.org/)
近期下载者:
相关文件:
收藏者: