Javascript 流星:我如何计算每分钟的推文,而不是所有的推文?
我使用Meteor来使用Twitters API来删除带有特定标签的推文。目前,我使用我的姓氏Cusack,请看现场演示: 自从我开始抓取推文以来,我只能得到推文的总数,但我想一分钟一分钟地存储数量。然后我可以计算平均值,等等 有人知道吗?以下是我目前的代码:Javascript 流星:我如何计算每分钟的推文,而不是所有的推文?,javascript,meteor,twitter,Javascript,Meteor,Twitter,我使用Meteor来使用Twitters API来删除带有特定标签的推文。目前,我使用我的姓氏Cusack,请看现场演示: 自从我开始抓取推文以来,我只能得到推文的总数,但我想一分钟一分钟地存储数量。然后我可以计算平均值,等等 有人知道吗?以下是我目前的代码: Meteor.subscribe("tweets"); Template.tweetsList.helpers({ // We need to make sure the count is of the current minute t
Meteor.subscribe("tweets");
Template.tweetsList.helpers({
// We need to make sure the count is of the current minute
tweetscount: function()
{
// Let's count the tweets
function tweetCount()
{
return Tweets.find().count();
}
return tweetCount();
}
});
提前谢谢你 你的问题很宽泛,所以这个答案很宽泛