updated to latest codegen

This commit is contained in:
Tony Tam 2012-12-04 10:36:12 -08:00
parent f4cd02283b
commit 2a9cf7c06d
14 changed files with 43 additions and 43 deletions

View File

@ -20,7 +20,7 @@ case class Definition (
relatedWords: List[Related],
sequence: String,
word: String,
textProns: List[TextPron],
notes: List[Note],
textProns: List[TextPron],
partOfSpeech: String)

View File

@ -5,15 +5,15 @@ import com.wordnik.client.model.ScoredWord
import com.wordnik.client.model.ContentProvider
case class Example (
id: Long,
text: String,
title: String,
exampleId: Long,
title: String,
text: String,
score: ScoredWord,
sentence: Sentence,
year: Int,
provider: ContentProvider,
word: String,
provider: ContentProvider,
year: Int,
rating: Float,
url: String,
documentId: Long)
documentId: Long,
url: String)

View File

@ -2,10 +2,10 @@ package com.wordnik.client.model
case class Related (
label1: String,
label2: String,
relationshipType: String,
label2: String,
label3: String,
words: List[String],
label4: String,
gram: String)
gram: String,
label4: String)

View File

@ -1,14 +1,14 @@
package com.wordnik.client.model
case class ScoredWord (
id: Long,
position: Int,
lemma: String,
id: Long,
docTermCount: Int,
lemma: String,
wordType: String,
score: Float,
word: String,
sentenceId: Long,
word: String,
stopword: Boolean,
baseWordScore: Double,
partOfSpeech: String)

View File

@ -2,8 +2,8 @@ package com.wordnik.client.model
import com.wordnik.client.model.ScoredWord
case class Sentence (
id: Long,
hasScoredWords: Boolean,
id: Long,
scoredWords: List[ScoredWord],
display: String,
rating: Int,

View File

@ -2,7 +2,7 @@ package com.wordnik.client.model
case class SimpleExample (
id: Long,
text: String,
title: String,
text: String,
url: String)

View File

@ -3,8 +3,8 @@ package com.wordnik.client.model
case class User (
id: Long,
username: String,
status: Int,
email: String,
status: Int,
faceBookId: String,
userName: String,
displayName: String,

View File

@ -3,14 +3,14 @@ package com.wordnik.client.model
import java.util.Date
case class WordList (
id: Long,
updatedAt: Date,
username: String,
permalink: String,
description: String,
createdAt: Date,
lastActivityAt: Date,
name: String,
createdAt: Date,
updatedAt: Date,
lastActivityAt: Date,
username: String,
userId: Long,
description: String,
numberWordsInList: Long,
`type`: String)

View File

@ -3,10 +3,10 @@ package com.wordnik.client.model
import java.util.Date
case class WordListWord (
id: Long,
username: String,
createdAt: Date,
userId: Long,
numberCommentsOnWord: Long,
word: String,
username: String,
userId: Long,
createdAt: Date,
numberCommentsOnWord: Long,
numberLists: Long)

View File

@ -2,8 +2,8 @@ package com.wordnik.client.model
case class WordObject (
id: Long,
originalWord: String,
word: String,
originalWord: String,
suggestions: List[String],
canonicalForm: String,
vulgar: String)

View File

@ -11,10 +11,10 @@ case class WordOfTheDay (
createdBy: String,
createdAt: Date,
contentProvider: ContentProvider,
word: String,
htmlExtra: String,
word: String,
definitions: List[SimpleDefinition],
examples: List[SimpleExample],
publishDate: Date,
note: String)
note: String,
publishDate: Date)

View File

@ -2,6 +2,6 @@ package com.wordnik.client.model
import com.wordnik.client.model.WordSearchResult
case class WordSearchResults (
totalResults: Int,
searchResults: List[WordSearchResult])
searchResults: List[WordSearchResult],
totalResults: Int)

View File

@ -25,7 +25,7 @@ class WordApiTest extends FlatSpec with ShouldMatchers with BaseApiTest {
it should "verify the word apis" in {
val json = Source.fromURL("http://api.wordnik.com/v4/word.json").mkString
val doc = JsonUtil.getJsonMapper.readValue(json, classOf[Documentation])
assert(doc.getApis.size === 11)
assert(doc.getApis.size === 12)
}
it should "fetch a word" in {

View File

@ -24,17 +24,17 @@ class WordListApiTest extends FlatSpec with ShouldMatchers with BaseApiTest {
val wordListsApi = new WordListsApi
val wordList = WordList(
0,
new java.util.Date,
null,
null,
"some words I want to play with",
null,
null,
"my test list",
0,
0,
"PUBLIC")
0, // id
null, // permalink
"my test list", // name
new java.util.Date, //created at
null, // updated at
null, // lastActivityAt
null, // username
0, // user id
"some words I want to play with", // description
0, // words in list
"PUBLIC") // type
var sampleList = wordListsApi.createWordList(wordList, auth.token) match {
case Some(wl) => wl