Class QuotesAPIClient

java.lang.Object
info.ejava.examples.svc.content.quotes.client.QuotesAPIClient
All Implemented Interfaces:
QuotesAPI

public class QuotesAPIClient extends Object implements QuotesAPI
  • Field Details

    • baseUrl

      private final URI baseUrl
    • webClient

      private final org.springframework.web.reactive.function.client.WebClient webClient
    • mediaType

      private final org.springframework.http.MediaType mediaType
  • Constructor Details

    • QuotesAPIClient

      public QuotesAPIClient(org.springframework.web.reactive.function.client.WebClient webClient, ServerConfig serverConfig, String mediaType)
    • QuotesAPIClient

      public QuotesAPIClient(org.springframework.web.reactive.function.client.WebClient webClient, ServerConfig serverConfig)
  • Method Details

    • createQuote

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<QuoteDTO>> createQuote(QuoteDTO quote)
      Specified by:
      createQuote in interface QuotesAPI
    • updateQuote

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Void>> updateQuote(int id, QuoteDTO quote)
      Specified by:
      updateQuote in interface QuotesAPI
    • containsQuote

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Void>> containsQuote(int id)
      Specified by:
      containsQuote in interface QuotesAPI
    • getQuote

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<QuoteDTO>> getQuote(int id)
      Specified by:
      getQuote in interface QuotesAPI
    • randomQuote

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<QuoteDTO>> randomQuote()
      Specified by:
      randomQuote in interface QuotesAPI
    • deleteQuote

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Void>> deleteQuote(int id)
      Specified by:
      deleteQuote in interface QuotesAPI
    • deleteAllQuotes

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Void>> deleteAllQuotes()
      Specified by:
      deleteAllQuotes in interface QuotesAPI
    • doDelete

      protected reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<Void>> doDelete(URI url)
    • getQuotes

      public reactor.core.publisher.Mono<org.springframework.http.ResponseEntity<QuoteListDTO>> getQuotes(Integer offset, Integer limit)
      Specified by:
      getQuotes in interface QuotesAPI