WRescuetime
介绍
RescueTime 是一个效率分析的软件,它可以全天候记录你的在线操作,并进行效率分析。
配合Gyroscope
(iOS APP)、IFTTT
等使用有奇效。并且可以自行 DIY新的玩法。
安装和使用
国际惯例:
yarn add wrescuetime# 或 npm install wrescuetime --save
使用示例:
const Wr = ;const wr = ; // Analytic Datawr;
支持方法:
- analyticData
- dailySummaryFeed
- alertsFeed
- highlightsFeed
- highlightsPost
API 文档参考: https://www.rescuetime.com/anapi/setup/documentation
分步教程
1.注册安装 RescueTime
注册链接: https://www.rescuetime.com/
下载并安装客户端,支持的环境有:
- Mac OS X: 10.6以上
- Windows: XP/Vista/7/8/10
- Linux: Ubuntu/Fedora
- Android: 2.1以上(需要 Google Play)
- Chrome 插件
- Firefox 插件
安装完成后,通过 API & Integrations 链接新建 API Key。
2. 搭建测试环境
服务器代码(使用koa@next
、koa-route@next
和moment
实现):
const Wr = ;const moment = ;const Koa = ;const route = ;const redisClient = ; const wr = ;moment;const redis = ; const app = ; // 核心代码// JSON 格式输出app; // 图片链接跳转app; app;
说明:
- 时间差(分钟)大于60判断为离线
- 效率大于90%判断为忙碌,请勿打扰
- 其他在线状况则显示默认在线
相关项目推荐
- 该SDK实际项目示例: https://github.com/willin/up.js.cool
- 微信小程序SDK: https://github.com/willin/mp-sdk
- 阿里云SDK: https://github.com/willin/waliyun
- 腾讯云SDK: https://github.com/willin/wqcloud
- 网易云音乐SDK: https://github.com/willin/wnm
License
Apache 2.0