Updated twitter api example.

- top 10 instead of top 50
- node.js term instead of hackathon
- using media-list instead of ul.list-unstyled
This commit is contained in:
Sahat Yalkabov
2014-05-29 16:44:13 -04:00
parent 51714b7f86
commit dcff72cb82
2 changed files with 11 additions and 14 deletions

View File

@ -253,7 +253,7 @@ exports.getTwitter = function(req, res, next) {
access_token: token.accessToken,
access_token_secret: token.tokenSecret
});
T.get('search/tweets', { q: 'hackathon since:2013-01-01', geocode: '40.71448,-74.00598,5mi', count: 50 }, function(err, reply) {
T.get('search/tweets', { q: 'nodejs since:2013-01-01', geocode: '40.71448,-74.00598,5mi', count: 10 }, function(err, reply) {
if (err) return next(err);
res.render('api/twitter', {
title: 'Twitter API',

View File

@ -18,18 +18,15 @@ block content
| API Endpoints
br
.lead Latest 50 Tweets containing "Hackathon" in NYC within 5 miles
.lead Latest #{tweets.length} Tweets containing the term "nodejs" in NYC within 5 miles radius
ul.list-unstyled
ul.media-list
for tweet in tweets
li
.panel.panel-default
.panel-body
.clearfix
- var image = tweet.user.profile_image_url.replace('_normal', '');
img.pull-left(src='#{image}', width=50, height=50, style='margin-right: 10px')
=tweet.user.name
small.text-muted @#{tweet.user.screen_name}
br
small #{tweet.text}
li.media
a.pull-left(href='#')
- var image = tweet.user.profile_image_url.replace('_normal', '');
img.media-object(src='#{image}', style='width: 64px; height: 64px;')
.media-body
strong.media-heading #{tweet.user.name}
span.text-muted @#{tweet.user.screen_name}
p= tweet.text