Powered by the gRPC API.

Getting started

  1. Install the latest version of the s2-sdk package.

    • Instructions on loading it into your Maven or Gradle dependencies can be found in the README.
  2. Generate an authentication token from the dashboard.

  3. Try creating a class which sends a request to S2.

package org.example.app;

import s2.client.Client;
import s2.config.Config;
import s2.types.ListBasinsRequest;

public class ListBasinsApp {

  public static void main(String[] args) throws Exception {
    try (var client = new Client(Config.newBuilder("my-auth-token").build())) {
      client
          .listBasins(ListBasinsRequest.newBuilder().build())
          .get()
          .elems()
          .forEach(System.out::println);
    }
  }
}

You can find more examples on the repo!