Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Grab('com.github.groovy-wslite:groovy-wslite:1.1.0')
import wslite.rest.*
import wslite.http.auth.*
def client = new RESTClient("https://api.github.com")
def response = client.get(
path: '/repos/restlet/restlet-framework-java/events',
query: [page: 11]) // <== page 11 and beyond yield 422
assert response.statusCode == 200
response.json.findAll { it.type == 'WatchEvent' }.each {
println it.created_at
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment