Class QuoteService

java.lang.Object
me.nickhanson.codeforge.service.QuoteService
All Implemented Interfaces:
PropertiesLoader

public class QuoteService extends Object implements PropertiesLoader
Service to fetch random programming quotes from an external API. Caches the last fetched quote for a configurable duration to reduce API calls. Supports filtering by author and tags via configuration properties.
  • Constructor Details

    • QuoteService

      public QuoteService()
  • Method Details

    • getRandomQuote

      public String getRandomQuote()
      Fetches a random programming quote from the external API. Caches the result for a configurable duration to minimize API calls. Applies user-specified filters for author and tags.
      Returns:
      A formatted quote string in the format: "text — Author"