All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.getstream.core.options.Ranking Maven / Gradle / Ivy

There is a newer version: 3.15.0
Show newest version
package io.getstream.core.options;

import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;

import io.getstream.core.http.Request;

public final class Ranking implements RequestOption {
  private final String ranking;

  public Ranking(String ranking) {
    checkNotNull(ranking, "Ranking can't be empty");
    checkArgument(!ranking.isEmpty(), "Ranking can't be empty");
    this.ranking = ranking;
  }

  public String getRanking() {
    return ranking;
  }

  @Override
  public void apply(Request.Builder builder) {
    builder.addQueryParameter("ranking", ranking);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy