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