Created
September 29, 2011 01:38
-
-
Save fehguy/1249778 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
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)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
assumes you've built the swagger client per this gist:
https://gist.github.com/1249756