stat-sdk

1.0.5 • Public • Published

Stat Statistical data SDK for Node.js

stat-sdk

npm-version github-stars github-forks

安装(installation)

$ npm install stat-sdk

例子(Example)

var Stat = require('stat-sdk');

// 初始化
var stat = new Stat({
    id : 'id',
    token : 'token'
});

// 统计
stat.count('id', 'type');

new Stat(data);

data:

{
    id : 'id',
    token : 'token'
}
  1. id 项目的所属ID
  2. token 项目的token

stat.count('id', 'type');

参数

  1. id 需要统计的分组ID
  2. type 每个分组的类型,如果该组没有类型可不填(可选)

该方法每调用一次,所对应的分组里面的统计数字就会增加 1


以上项目ID,分组ID均在控制台中查看。并妥善保管自己项目的ID,TOKEN

License

The MIT License (MIT)

Copyright (c) <2015> berwin berwin1995@qq.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Readme

Keywords

none

Package Sidebar

Install

npm i stat-sdk

Weekly Downloads

0

Version

1.0.5

License

MIT

Last publish

Collaborators

  • berwin