Created
April 16, 2015 22:06
-
-
Save glaforge/22d221f0494163628309 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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