Skip to content

Instantly share code, notes, and snippets.

@fehguy
Created September 29, 2011 01:38
Show Gist options
  • Save fehguy/1249778 to your computer and use it in GitHub Desktop.
Save fehguy/1249778 to your computer and use it in GitHub Desktop.
package com.wordnik.client
import com.wordnik.client.api._
import com.wordnik.client.model._
import com.wordnik.swagger.runtime.common._
object Test {
def main(args: Array[String]) = {
val securityHandler = new ApiKeyAuthTokenBasedSecurityHandler("{YOUR_KEY}", null)
APIInvoker.initialize(securityHandler, "http://api.wordnik.com/v4", false)
val defInput = new WordDefinitionsInput
defInput.word = "cat"
WordAPI.getDefinitions(defInput).foreach(definition => println(definition.text))
}
}
@fehguy
Copy link
Author

fehguy commented Sep 29, 2011

assumes you've built the swagger client per this gist:

https://gist.github.com/1249756

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment