Comments (5)
这个就厉害了😹
from twikoo.
可否写一个调用 文章访问量/评论数 的API,类似最新评论一样
我觉得这里面不好权衡的就是,文章一多(比如500篇)就会对云数据库Counter集合查询带来压力、免费资源耗费多,但是感觉云函数处理性能,貌似也可以接受?
from twikoo.
可否写一个调用 文章访问量/评论数 的API,类似最新评论一样
- 文章访问量 API,还没有
- 文章评论数 API,已经有了:https://twikoo.js.org/api.html#get-comments-count
- API 是批量获取,不会消耗大量免费资源的
- 文章多了可以分页获取,不要一次获取 500 个数据,因为云开发数据库一次只能获取100条
from twikoo.
可否写一个调用 文章访问量/评论数 的API,类似最新评论一样
- 文章访问量 API,还没有
- 文章评论数 API,已经有了:https://twikoo.js.org/api.html#get-comments-count
- API 是批量获取,不会消耗大量免费资源的
- 文章多了可以分页获取,不要一次获取 500 个数据,因为云开发数据库一次只能获取100条
那有什么方法可以批量获取各文章的访问量吗?
将资源文件夹下的所有文章url存到一个数组,然后再对其进行循环获取各个文章下的twikoo_visitors访问量?
https://7.dusays.com/2021/03/31/c9325daf53ffe.png【截图】
from twikoo.
那有什么方法可以批量获取各文章的访问量吗?
将资源文件夹下的所有文章url存到一个数组,然后再对其进行循环获取各个文章下的twikoo_visitors访问量?
@wztlink1013 需要写一个新的 API 来获取文章的访问量。但是很抱歉,工作原因,最近没有时间维护 twikoo,你可以参照获取评论数的接口代码,开发一个获取访问量的接口。
from twikoo.
Related Issues (20)
- cdn.staticfile.org 返回的 1.6.30 版本的 twikoo.all.min.js 提示 404 File Not Found HOT 2
- BUG: 验证码没有显示在最上面 HOT 1
- 按照文档部署到 Hugging Face报错 HOT 4
- 代码高亮 prism-xonokai.min.css CDN 资源不存在 HOT 1
- TG 即时推送401问题 HOT 2
- 站长头像问题 HOT 1
- vercel 部署失败 No Output Directory named "public" found after the Build completed. HOT 3
- BUG: Netlify 部署有概率出现无法获取MongoDB数据的情况
- [Feature Request] health probe
- 建议在用户端也添加评论搜索功能
- 加载icon没有居中,是出于什么考虑不把居中css放到本体里呢? HOT 2
- 关于代码高亮语言路径问题
- 新功能建议:希望可以将图片转换为base64编码格式存储 HOT 1
- 私有部署端口问题 HOT 2
- 评论失败:评论太火爆啦 >_< 请稍后再试 HOT 3
- 添加基于正则表达式的屏蔽词/违禁词功能
- 本地localhost没问题,push到网上就出问题 HOT 4
- 测试邮件发送的时候显示“数据库配置不存在” HOT 6
- 可看到评论,无邮箱回复,有报错日志 HOT 3
- vercel 部署 deploy build 报错 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twikoo.