1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-10 21:24:20 +01:00
fab-manager/app/controllers/api/feeds_controller.rb

16 lines
347 B
Ruby
Raw Normal View History

2015-05-05 03:10:25 +02:00
class API::FeedsController < API::ApiController
respond_to :json
def twitter_timelines
if params
limit = params[:limit]
else
limit = 3
end
2016-03-23 18:39:41 +01:00
from_account = Setting.find_by(name: 'twitter_name').try(:value) || ENV['TWITTER_NAME']
@tweet_news = Feed.twitter.user_timeline(from_account, {count: limit})
2015-05-05 03:10:25 +02:00
end
end