Class: QiitaExport::Fetcher::UrlFetcher

Inherits:
ApiFetcher show all
Defined in:
lib/qiita-export/fetcher/url_fetcher.rb

Instance Method Summary collapse

Methods inherited from Base

#exclude?

Constructor Details

#initializeUrlFetcher

Returns a new instance of UrlFetcher.



8
9
10
11
# File 'lib/qiita-export/fetcher/url_fetcher.rb', line 8

def initialize
  super()
  @endpoint = ApiEndPoint.instance(:item)
end

Instance Method Details

#find_articlesObject



13
14
15
16
17
18
19
20
# File 'lib/qiita-export/fetcher/url_fetcher.rb', line 13

def find_articles
  articles = []
  article_urls.each do |url|
    article = to_article(find_article(url))
    articles << article unless exclude?(article.title)
  end
  articles
end