Skip to content

Instantly share code, notes, and snippets.

@glaforge
Created April 16, 2015 22:06
Show Gist options
  • Save glaforge/22d221f0494163628309 to your computer and use it in GitHub Desktop.
Save glaforge/22d221f0494163628309 to your computer and use it in GitHub Desktop.
@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