Class GGClient.Builder

    • Method Detail

      • client

        @Nonnull
        public GGClient.Builder client​(@Nullable
                                       okhttp3.OkHttpClient client)
        Sets the OkHttpClient used to make requests.
        Parameters:
        client - the OkHttpClient to use or null
        Returns:
        itself for chaining
      • limiter

        @Nonnull
        public GGClient.Builder limiter​(@Nullable
                                        RateLimiter limiter)
        Sets the RateLimiter used to schedule requests.
        Parameters:
        limiter - the RateLimiter to use or null
        Returns:
        itself for chaining
      • maxRetries

        @Nonnull
        public GGClient.Builder maxRetries​(@Nonnegative @Nullable
                                           java.lang.Integer maxRetries)
        Sets the maximum number of retries for one request.
        Parameters:
        maxRetries - the maximum amount of retriest for one request to use or null
        Returns:
        itself for chaining
      • build

        @Nonnull
        public GGClient build()
        Builds the GGClient instance.
        Returns:
        the GGClient instance