@Grab('org.codehaus.groovy:groovy-all:2.4.6') @Grab('io.swagger:swagger-annotations:1.5.8') @Grab('com.fasterxml.jackson.core:jackson-core:2.7.0') @Grab('com.fasterxml.jackson.core:jackson-annotations:2.7.0') @Grab('com.fasterxml.jackson.core:jackson-databind:2.7.0') @Grab('com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.7.0') @Grab('com.fasterxml.jackson.datatype:jackson-datatype-joda:2.1.5') @Grab('org.codehaus.groovy.modules.http-builder:http-builder:0.7.1') import uk.org.gss_data.pmd_drafter.api.DraftsetsApi def call(auth) { api = new DraftsetsApi() api.basePath = "https://production-drafter-ons-alpha.publishmydata.com" api.versionPath = "/v1" api.auth = auth api.draftsetsGet(null, { result -> echo result }, { status, reason -> echo reason }) }