Examples, both JSON and code, of using the S2 API