Skip to content

egXcoder/news_fetcher

Repository files navigation

News Fetcher

Pulling News From Various Different News APIs

Ingestion

  • NewsProvider (N classes) knows how to fetch + map ... [strategy pattern]
  • NewsProviderFactory (1 class) instantiate provider from its sourcename
  • FetchContext (1 class) DTO which will hold last_updated_at + page
  • FetchResult (1 class) DTO which will hold data returned from NewProvider + nextFetchContext
  • FetchContextRepository (1 class) to record fetchcontext in database and to retrieve
  • DataSaver (1 class) Should save data returned from api into database
  • Fetcher (1 class) will have one method to use NewsProvider + FetchPolicy + DataSaver .. [Facade Pattern]
  • ThrottledFetcher (1 class) will wrap Fetcher to throttle requests to api
  • Command (1 class) with argument of which NewsApi should be used

Notice

  • No need to create an eloquent model for FetchContext, since it will already live as DTO (then no confusion)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published