This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
mastodon/app/services/fetch_feed_service.rb

18 lines
328 B
Ruby
Raw Normal View History

2016-02-24 03:57:29 -08:00
class FetchFeedService < BaseService
# Fetch an account's feed and process it
# @param [Account] account
2016-02-20 13:53:20 -08:00
def call(account)
2016-02-22 07:00:20 -08:00
process_service.(http_client.get(account.remote_url), account)
end
private
def process_service
2016-02-24 03:57:29 -08:00
@process_service ||= ProcessFeedService.new
2016-02-22 07:00:20 -08:00
end
def http_client
HTTP
2016-02-20 13:53:20 -08:00
end
end