add amount parameter to service method

This commit is contained in:
Riku Rouvila
2015-02-03 23:08:38 +02:00
parent ee7fd0be68
commit 099132c5fd
3 changed files with 6 additions and 6 deletions

View File

@@ -15,9 +15,9 @@ module.exports = {
/**
* Fetch five latest tweets / retweets from Twitter
*/
getTweets: function() {
getTweets: function(amount) {
return new Promise(function(resolve, reject) {
twitterRestClient.statusesUserTimeline({count: 5}, function(error, result) {
twitterRestClient.statusesUserTimeline({count: amount}, function(error, result) {
if (error) {
reject(error);
}