regenerated client

This commit is contained in:
Tony Tam 2014-06-10 10:36:13 -07:00
parent 85113df113
commit b78721826e
5 changed files with 226 additions and 0 deletions

View File

@ -29,13 +29,17 @@ class AccountApi(object):
self.apiClient = apiClient self.apiClient = apiClient
def authenticate(self, username, password, **kwargs): def authenticate(self, username, password, **kwargs):
"""Authenticates a User """Authenticates a User
Args: Args:
username, str: A confirmed Wordnik username (required) username, str: A confirmed Wordnik username (required)
password, str: The user's password (required) password, str: The user's password (required)
Returns: AuthenticationToken Returns: AuthenticationToken
""" """
@ -72,14 +76,19 @@ class AccountApi(object):
responseObject = self.apiClient.deserialize(response, 'AuthenticationToken') responseObject = self.apiClient.deserialize(response, 'AuthenticationToken')
return responseObject return responseObject
def authenticatePost(self, username, body, **kwargs): def authenticatePost(self, username, body, **kwargs):
"""Authenticates a user """Authenticates a user
Args: Args:
username, str: A confirmed Wordnik username (required) username, str: A confirmed Wordnik username (required)
body, str: The user's password (required) body, str: The user's password (required)
Returns: AuthenticationToken Returns: AuthenticationToken
""" """
@ -114,15 +123,21 @@ class AccountApi(object):
responseObject = self.apiClient.deserialize(response, 'AuthenticationToken') responseObject = self.apiClient.deserialize(response, 'AuthenticationToken')
return responseObject return responseObject
def getWordListsForLoggedInUser(self, auth_token, **kwargs): def getWordListsForLoggedInUser(self, auth_token, **kwargs):
"""Fetches WordList objects for the logged-in user. """Fetches WordList objects for the logged-in user.
Args: Args:
auth_token, str: auth_token of logged-in user (required) auth_token, str: auth_token of logged-in user (required)
skip, int: Results to skip (optional) skip, int: Results to skip (optional)
limit, int: Maximum number of results to return (optional) limit, int: Maximum number of results to return (optional)
Returns: list[WordList] Returns: list[WordList]
""" """
@ -159,13 +174,17 @@ class AccountApi(object):
responseObject = self.apiClient.deserialize(response, 'list[WordList]') responseObject = self.apiClient.deserialize(response, 'list[WordList]')
return responseObject return responseObject
def getApiTokenStatus(self, **kwargs): def getApiTokenStatus(self, **kwargs):
"""Returns usage statistics for the API account. """Returns usage statistics for the API account.
Args: Args:
api_key, str: Wordnik authentication token (optional) api_key, str: Wordnik authentication token (optional)
Returns: ApiTokenStatus Returns: ApiTokenStatus
""" """
@ -198,13 +217,17 @@ class AccountApi(object):
responseObject = self.apiClient.deserialize(response, 'ApiTokenStatus') responseObject = self.apiClient.deserialize(response, 'ApiTokenStatus')
return responseObject return responseObject
def getLoggedInUser(self, auth_token, **kwargs): def getLoggedInUser(self, auth_token, **kwargs):
"""Returns the logged-in User """Returns the logged-in User
Args: Args:
auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required) auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required)
Returns: User Returns: User
""" """
@ -237,7 +260,11 @@ class AccountApi(object):
responseObject = self.apiClient.deserialize(response, 'User') responseObject = self.apiClient.deserialize(response, 'User')
return responseObject return responseObject

View File

@ -29,16 +29,23 @@ class WordApi(object):
self.apiClient = apiClient self.apiClient = apiClient
def getExamples(self, word, **kwargs): def getExamples(self, word, **kwargs):
"""Returns examples for a word """Returns examples for a word
Args: Args:
word, str: Word to return examples for (required) word, str: Word to return examples for (required)
includeDuplicates, str: Show duplicate examples from different sources (optional) includeDuplicates, str: Show duplicate examples from different sources (optional)
useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional) useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional)
skip, int: Results to skip (optional) skip, int: Results to skip (optional)
limit, int: Maximum number of results to return (optional) limit, int: Maximum number of results to return (optional)
Returns: ExampleSearchResults Returns: ExampleSearchResults
""" """
@ -81,15 +88,21 @@ class WordApi(object):
responseObject = self.apiClient.deserialize(response, 'ExampleSearchResults') responseObject = self.apiClient.deserialize(response, 'ExampleSearchResults')
return responseObject return responseObject
def getWord(self, word, **kwargs): def getWord(self, word, **kwargs):
"""Given a word as a string, returns the WordObject that represents it """Given a word as a string, returns the WordObject that represents it
Args: Args:
word, str: String value of WordObject to return (required) word, str: String value of WordObject to return (required)
useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional) useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional)
includeSuggestions, str: Return suggestions (for correct spelling, case variants, etc.) (optional) includeSuggestions, str: Return suggestions (for correct spelling, case variants, etc.) (optional)
Returns: WordObject Returns: WordObject
""" """
@ -128,19 +141,29 @@ class WordApi(object):
responseObject = self.apiClient.deserialize(response, 'WordObject') responseObject = self.apiClient.deserialize(response, 'WordObject')
return responseObject return responseObject
def getDefinitions(self, word, **kwargs): def getDefinitions(self, word, **kwargs):
"""Return definitions for a word """Return definitions for a word
Args: Args:
word, str: Word to return definitions for (required) word, str: Word to return definitions for (required)
partOfSpeech, str: CSV list of part-of-speech types (optional) partOfSpeech, str: CSV list of part-of-speech types (optional)
sourceDictionaries, str: Source dictionary to return definitions from. If 'all' is received, results are returned from all sources. If multiple values are received (e.g. 'century,wiktionary'), results are returned from the first specified dictionary that has definitions. If left blank, results are returned from the first dictionary that has definitions. By default, dictionaries are searched in this order: ahd, wiktionary, webster, century, wordnet (optional) sourceDictionaries, str: Source dictionary to return definitions from. If 'all' is received, results are returned from all sources. If multiple values are received (e.g. 'century,wiktionary'), results are returned from the first specified dictionary that has definitions. If left blank, results are returned from the first dictionary that has definitions. By default, dictionaries are searched in this order: ahd, wiktionary, webster, century, wordnet (optional)
limit, int: Maximum number of results to return (optional) limit, int: Maximum number of results to return (optional)
includeRelated, str: Return related words with definitions (optional) includeRelated, str: Return related words with definitions (optional)
useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional) useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional)
includeTags, str: Return a closed set of XML tags in response (optional) includeTags, str: Return a closed set of XML tags in response (optional)
Returns: list[Definition] Returns: list[Definition]
""" """
@ -187,14 +210,19 @@ class WordApi(object):
responseObject = self.apiClient.deserialize(response, 'list[Definition]') responseObject = self.apiClient.deserialize(response, 'list[Definition]')
return responseObject return responseObject
def getTopExample(self, word, **kwargs): def getTopExample(self, word, **kwargs):
"""Returns a top example for a word """Returns a top example for a word
Args: Args:
word, str: Word to fetch examples for (required) word, str: Word to fetch examples for (required)
useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional) useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional)
Returns: Example Returns: Example
""" """
@ -231,16 +259,23 @@ class WordApi(object):
responseObject = self.apiClient.deserialize(response, 'Example') responseObject = self.apiClient.deserialize(response, 'Example')
return responseObject return responseObject
def getRelatedWords(self, word, **kwargs): def getRelatedWords(self, word, **kwargs):
"""Given a word as a string, returns relationships from the Word Graph """Given a word as a string, returns relationships from the Word Graph
Args: Args:
word, str: Word to fetch relationships for (required) word, str: Word to fetch relationships for (required)
relationshipTypes, str: Limits the total results per type of relationship type (optional) relationshipTypes, str: Limits the total results per type of relationship type (optional)
useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional) useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional)
limitPerRelationshipType, int: Restrict to the supplied relatinship types (optional) limitPerRelationshipType, int: Restrict to the supplied relatinship types (optional)
Returns: list[Related] Returns: list[Related]
""" """
@ -281,17 +316,25 @@ class WordApi(object):
responseObject = self.apiClient.deserialize(response, 'list[Related]') responseObject = self.apiClient.deserialize(response, 'list[Related]')
return responseObject return responseObject
def getTextPronunciations(self, word, **kwargs): def getTextPronunciations(self, word, **kwargs):
"""Returns text pronunciations for a given word """Returns text pronunciations for a given word
Args: Args:
word, str: Word to get pronunciations for (required) word, str: Word to get pronunciations for (required)
sourceDictionary, str: Get from a single dictionary (optional) sourceDictionary, str: Get from a single dictionary (optional)
typeFormat, str: Text pronunciation type (optional) typeFormat, str: Text pronunciation type (optional)
useCanonical, str: If true will try to return a correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional) useCanonical, str: If true will try to return a correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional)
limit, int: Maximum number of results to return (optional) limit, int: Maximum number of results to return (optional)
Returns: list[TextPron] Returns: list[TextPron]
""" """
@ -334,16 +377,23 @@ class WordApi(object):
responseObject = self.apiClient.deserialize(response, 'list[TextPron]') responseObject = self.apiClient.deserialize(response, 'list[TextPron]')
return responseObject return responseObject
def getHyphenation(self, word, **kwargs): def getHyphenation(self, word, **kwargs):
"""Returns syllable information for a word """Returns syllable information for a word
Args: Args:
word, str: Word to get syllables for (required) word, str: Word to get syllables for (required)
sourceDictionary, str: Get from a single dictionary. Valid options: ahd, century, wiktionary, webster, and wordnet. (optional) sourceDictionary, str: Get from a single dictionary. Valid options: ahd, century, wiktionary, webster, and wordnet. (optional)
useCanonical, str: If true will try to return a correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional) useCanonical, str: If true will try to return a correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional)
limit, int: Maximum number of results to return (optional) limit, int: Maximum number of results to return (optional)
Returns: list[Syllable] Returns: list[Syllable]
""" """
@ -384,16 +434,23 @@ class WordApi(object):
responseObject = self.apiClient.deserialize(response, 'list[Syllable]') responseObject = self.apiClient.deserialize(response, 'list[Syllable]')
return responseObject return responseObject
def getWordFrequency(self, word, **kwargs): def getWordFrequency(self, word, **kwargs):
"""Returns word usage over time """Returns word usage over time
Args: Args:
word, str: Word to return (required) word, str: Word to return (required)
useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional) useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional)
startYear, int: Starting Year (optional) startYear, int: Starting Year (optional)
endYear, int: Ending Year (optional) endYear, int: Ending Year (optional)
Returns: FrequencySummary Returns: FrequencySummary
""" """
@ -434,16 +491,23 @@ class WordApi(object):
responseObject = self.apiClient.deserialize(response, 'FrequencySummary') responseObject = self.apiClient.deserialize(response, 'FrequencySummary')
return responseObject return responseObject
def getPhrases(self, word, **kwargs): def getPhrases(self, word, **kwargs):
"""Fetches bi-gram phrases for a word """Fetches bi-gram phrases for a word
Args: Args:
word, str: Word to fetch phrases for (required) word, str: Word to fetch phrases for (required)
limit, int: Maximum number of results to return (optional) limit, int: Maximum number of results to return (optional)
wlmi, int: Minimum WLMI for the phrase (optional) wlmi, int: Minimum WLMI for the phrase (optional)
useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional) useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional)
Returns: list[Bigram] Returns: list[Bigram]
""" """
@ -484,14 +548,19 @@ class WordApi(object):
responseObject = self.apiClient.deserialize(response, 'list[Bigram]') responseObject = self.apiClient.deserialize(response, 'list[Bigram]')
return responseObject return responseObject
def getEtymologies(self, word, **kwargs): def getEtymologies(self, word, **kwargs):
"""Fetches etymology data """Fetches etymology data
Args: Args:
word, str: Word to return (required) word, str: Word to return (required)
useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional) useCanonical, str: If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested. (optional)
Returns: list[str] Returns: list[str]
""" """
@ -528,15 +597,21 @@ class WordApi(object):
responseObject = self.apiClient.deserialize(response, 'list[str]') responseObject = self.apiClient.deserialize(response, 'list[str]')
return responseObject return responseObject
def getAudio(self, word, **kwargs): def getAudio(self, word, **kwargs):
"""Fetches audio metadata for a word. """Fetches audio metadata for a word.
Args: Args:
word, str: Word to get audio for. (required) word, str: Word to get audio for. (required)
useCanonical, str: Use the canonical form of the word (optional) useCanonical, str: Use the canonical form of the word (optional)
limit, int: Maximum number of results to return (optional) limit, int: Maximum number of results to return (optional)
Returns: list[AudioFile] Returns: list[AudioFile]
""" """
@ -575,13 +650,17 @@ class WordApi(object):
responseObject = self.apiClient.deserialize(response, 'list[AudioFile]') responseObject = self.apiClient.deserialize(response, 'list[AudioFile]')
return responseObject return responseObject
def getScrabbleScore(self, word, **kwargs): def getScrabbleScore(self, word, **kwargs):
"""Returns the Scrabble score for a word """Returns the Scrabble score for a word
Args: Args:
word, str: Word to get scrabble score for. (required) word, str: Word to get scrabble score for. (required)
Returns: ScrabbleScoreResult Returns: ScrabbleScoreResult
""" """
@ -616,7 +695,11 @@ class WordApi(object):
responseObject = self.apiClient.deserialize(response, 'ScrabbleScoreResult') responseObject = self.apiClient.deserialize(response, 'ScrabbleScoreResult')
return responseObject return responseObject

View File

@ -29,14 +29,19 @@ class WordListApi(object):
self.apiClient = apiClient self.apiClient = apiClient
def updateWordList(self, permalink, auth_token, **kwargs): def updateWordList(self, permalink, auth_token, **kwargs):
"""Updates an existing WordList """Updates an existing WordList
Args: Args:
permalink, str: permalink of WordList to update (required) permalink, str: permalink of WordList to update (required)
body, WordList: Updated WordList (optional) body, WordList: Updated WordList (optional)
auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required) auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required)
Returns: Returns:
""" """
@ -68,14 +73,19 @@ class WordListApi(object):
postData, headerParams) postData, headerParams)
def deleteWordList(self, permalink, auth_token, **kwargs): def deleteWordList(self, permalink, auth_token, **kwargs):
"""Deletes an existing WordList """Deletes an existing WordList
Args: Args:
permalink, str: ID of WordList to delete (required) permalink, str: ID of WordList to delete (required)
auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required) auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required)
Returns: Returns:
""" """
@ -107,14 +117,19 @@ class WordListApi(object):
postData, headerParams) postData, headerParams)
def getWordListByPermalink(self, permalink, auth_token, **kwargs): def getWordListByPermalink(self, permalink, auth_token, **kwargs):
"""Fetches a WordList by ID """Fetches a WordList by ID
Args: Args:
permalink, str: permalink of WordList to fetch (required) permalink, str: permalink of WordList to fetch (required)
auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required) auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required)
Returns: WordList Returns: WordList
""" """
@ -151,15 +166,21 @@ class WordListApi(object):
responseObject = self.apiClient.deserialize(response, 'WordList') responseObject = self.apiClient.deserialize(response, 'WordList')
return responseObject return responseObject
def addWordsToWordList(self, permalink, auth_token, **kwargs): def addWordsToWordList(self, permalink, auth_token, **kwargs):
"""Adds words to a WordList """Adds words to a WordList
Args: Args:
permalink, str: permalink of WordList to user (required) permalink, str: permalink of WordList to user (required)
body, list[StringValue]: Array of words to add to WordList (optional) body, list[StringValue]: Array of words to add to WordList (optional)
auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required) auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required)
Returns: Returns:
""" """
@ -191,18 +212,27 @@ class WordListApi(object):
postData, headerParams) postData, headerParams)
def getWordListWords(self, permalink, auth_token, **kwargs): def getWordListWords(self, permalink, auth_token, **kwargs):
"""Fetches words in a WordList """Fetches words in a WordList
Args: Args:
permalink, str: ID of WordList to use (required) permalink, str: ID of WordList to use (required)
auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required) auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required)
sortBy, str: Field to sort by (optional) sortBy, str: Field to sort by (optional)
sortOrder, str: Direction to sort (optional) sortOrder, str: Direction to sort (optional)
skip, int: Results to skip (optional) skip, int: Results to skip (optional)
limit, int: Maximum number of results to return (optional) limit, int: Maximum number of results to return (optional)
Returns: list[WordListWord] Returns: list[WordListWord]
""" """
@ -247,15 +277,21 @@ class WordListApi(object):
responseObject = self.apiClient.deserialize(response, 'list[WordListWord]') responseObject = self.apiClient.deserialize(response, 'list[WordListWord]')
return responseObject return responseObject
def deleteWordsFromWordList(self, permalink, auth_token, **kwargs): def deleteWordsFromWordList(self, permalink, auth_token, **kwargs):
"""Removes words from a WordList """Removes words from a WordList
Args: Args:
permalink, str: permalink of WordList to use (required) permalink, str: permalink of WordList to use (required)
body, list[StringValue]: Words to remove from WordList (optional) body, list[StringValue]: Words to remove from WordList (optional)
auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required) auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required)
Returns: Returns:
""" """
@ -287,7 +323,11 @@ class WordListApi(object):
postData, headerParams) postData, headerParams)

View File

@ -29,13 +29,17 @@ class WordListsApi(object):
self.apiClient = apiClient self.apiClient = apiClient
def createWordList(self, auth_token, **kwargs): def createWordList(self, auth_token, **kwargs):
"""Creates a WordList. """Creates a WordList.
Args: Args:
body, WordList: WordList to create (optional) body, WordList: WordList to create (optional)
auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required) auth_token, str: The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above) (required)
Returns: WordList Returns: WordList
""" """
@ -68,7 +72,11 @@ class WordListsApi(object):
responseObject = self.apiClient.deserialize(response, 'WordList') responseObject = self.apiClient.deserialize(response, 'WordList')
return responseObject return responseObject

View File

@ -29,23 +29,37 @@ class WordsApi(object):
self.apiClient = apiClient self.apiClient = apiClient
def searchWords(self, query, **kwargs): def searchWords(self, query, **kwargs):
"""Searches words """Searches words
Args: Args:
query, str: Search query (required) query, str: Search query (required)
includePartOfSpeech, str: Only include these comma-delimited parts of speech (optional) includePartOfSpeech, str: Only include these comma-delimited parts of speech (optional)
excludePartOfSpeech, str: Exclude these comma-delimited parts of speech (optional) excludePartOfSpeech, str: Exclude these comma-delimited parts of speech (optional)
caseSensitive, str: Search case sensitive (optional) caseSensitive, str: Search case sensitive (optional)
minCorpusCount, int: Minimum corpus frequency for terms (optional) minCorpusCount, int: Minimum corpus frequency for terms (optional)
maxCorpusCount, int: Maximum corpus frequency for terms (optional) maxCorpusCount, int: Maximum corpus frequency for terms (optional)
minDictionaryCount, int: Minimum number of dictionary entries for words returned (optional) minDictionaryCount, int: Minimum number of dictionary entries for words returned (optional)
maxDictionaryCount, int: Maximum dictionary definition count (optional) maxDictionaryCount, int: Maximum dictionary definition count (optional)
minLength, int: Minimum word length (optional) minLength, int: Minimum word length (optional)
maxLength, int: Maximum word length (optional) maxLength, int: Maximum word length (optional)
skip, int: Results to skip (optional) skip, int: Results to skip (optional)
limit, int: Maximum number of results to return (optional) limit, int: Maximum number of results to return (optional)
Returns: WordSearchResults Returns: WordSearchResults
""" """
@ -102,13 +116,17 @@ class WordsApi(object):
responseObject = self.apiClient.deserialize(response, 'WordSearchResults') responseObject = self.apiClient.deserialize(response, 'WordSearchResults')
return responseObject return responseObject
def getWordOfTheDay(self, **kwargs): def getWordOfTheDay(self, **kwargs):
"""Returns a specific WordOfTheDay """Returns a specific WordOfTheDay
Args: Args:
date, str: Fetches by date in yyyy-MM-dd (optional) date, str: Fetches by date in yyyy-MM-dd (optional)
Returns: WordOfTheDay Returns: WordOfTheDay
""" """
@ -141,28 +159,47 @@ class WordsApi(object):
responseObject = self.apiClient.deserialize(response, 'WordOfTheDay') responseObject = self.apiClient.deserialize(response, 'WordOfTheDay')
return responseObject return responseObject
def reverseDictionary(self, query, **kwargs): def reverseDictionary(self, query, **kwargs):
"""Reverse dictionary search """Reverse dictionary search
Args: Args:
query, str: Search term (required) query, str: Search term (required)
findSenseForWord, str: Restricts words and finds closest sense (optional) findSenseForWord, str: Restricts words and finds closest sense (optional)
includeSourceDictionaries, str: Only include these comma-delimited source dictionaries (optional) includeSourceDictionaries, str: Only include these comma-delimited source dictionaries (optional)
excludeSourceDictionaries, str: Exclude these comma-delimited source dictionaries (optional) excludeSourceDictionaries, str: Exclude these comma-delimited source dictionaries (optional)
includePartOfSpeech, str: Only include these comma-delimited parts of speech (optional) includePartOfSpeech, str: Only include these comma-delimited parts of speech (optional)
excludePartOfSpeech, str: Exclude these comma-delimited parts of speech (optional) excludePartOfSpeech, str: Exclude these comma-delimited parts of speech (optional)
expandTerms, str: Expand terms (optional) expandTerms, str: Expand terms (optional)
sortBy, str: Attribute to sort by (optional) sortBy, str: Attribute to sort by (optional)
sortOrder, str: Sort direction (optional) sortOrder, str: Sort direction (optional)
minCorpusCount, int: Minimum corpus frequency for terms (optional) minCorpusCount, int: Minimum corpus frequency for terms (optional)
maxCorpusCount, int: Maximum corpus frequency for terms (optional) maxCorpusCount, int: Maximum corpus frequency for terms (optional)
minLength, int: Minimum word length (optional) minLength, int: Minimum word length (optional)
maxLength, int: Maximum word length (optional) maxLength, int: Maximum word length (optional)
includeTags, str: Return a closed set of XML tags in response (optional) includeTags, str: Return a closed set of XML tags in response (optional)
skip, str: Results to skip (optional) skip, str: Results to skip (optional)
limit, int: Maximum number of results to return (optional) limit, int: Maximum number of results to return (optional)
Returns: DefinitionSearchResults Returns: DefinitionSearchResults
""" """
@ -225,24 +262,39 @@ class WordsApi(object):
responseObject = self.apiClient.deserialize(response, 'DefinitionSearchResults') responseObject = self.apiClient.deserialize(response, 'DefinitionSearchResults')
return responseObject return responseObject
def getRandomWords(self, **kwargs): def getRandomWords(self, **kwargs):
"""Returns an array of random WordObjects """Returns an array of random WordObjects
Args: Args:
includePartOfSpeech, str: CSV part-of-speech values to include (optional) includePartOfSpeech, str: CSV part-of-speech values to include (optional)
excludePartOfSpeech, str: CSV part-of-speech values to exclude (optional) excludePartOfSpeech, str: CSV part-of-speech values to exclude (optional)
sortBy, str: Attribute to sort by (optional) sortBy, str: Attribute to sort by (optional)
sortOrder, str: Sort direction (optional) sortOrder, str: Sort direction (optional)
hasDictionaryDef, str: Only return words with dictionary definitions (optional) hasDictionaryDef, str: Only return words with dictionary definitions (optional)
minCorpusCount, int: Minimum corpus frequency for terms (optional) minCorpusCount, int: Minimum corpus frequency for terms (optional)
maxCorpusCount, int: Maximum corpus frequency for terms (optional) maxCorpusCount, int: Maximum corpus frequency for terms (optional)
minDictionaryCount, int: Minimum dictionary count (optional) minDictionaryCount, int: Minimum dictionary count (optional)
maxDictionaryCount, int: Maximum dictionary count (optional) maxDictionaryCount, int: Maximum dictionary count (optional)
minLength, int: Minimum word length (optional) minLength, int: Minimum word length (optional)
maxLength, int: Maximum word length (optional) maxLength, int: Maximum word length (optional)
limit, int: Maximum number of results to return (optional) limit, int: Maximum number of results to return (optional)
Returns: list[WordObject] Returns: list[WordObject]
""" """
@ -297,21 +349,33 @@ class WordsApi(object):
responseObject = self.apiClient.deserialize(response, 'list[WordObject]') responseObject = self.apiClient.deserialize(response, 'list[WordObject]')
return responseObject return responseObject
def getRandomWord(self, **kwargs): def getRandomWord(self, **kwargs):
"""Returns a single random WordObject """Returns a single random WordObject
Args: Args:
includePartOfSpeech, str: CSV part-of-speech values to include (optional) includePartOfSpeech, str: CSV part-of-speech values to include (optional)
excludePartOfSpeech, str: CSV part-of-speech values to exclude (optional) excludePartOfSpeech, str: CSV part-of-speech values to exclude (optional)
hasDictionaryDef, str: Only return words with dictionary definitions (optional) hasDictionaryDef, str: Only return words with dictionary definitions (optional)
minCorpusCount, int: Minimum corpus frequency for terms (optional) minCorpusCount, int: Minimum corpus frequency for terms (optional)
maxCorpusCount, int: Maximum corpus frequency for terms (optional) maxCorpusCount, int: Maximum corpus frequency for terms (optional)
minDictionaryCount, int: Minimum dictionary count (optional) minDictionaryCount, int: Minimum dictionary count (optional)
maxDictionaryCount, int: Maximum dictionary count (optional) maxDictionaryCount, int: Maximum dictionary count (optional)
minLength, int: Minimum word length (optional) minLength, int: Minimum word length (optional)
maxLength, int: Maximum word length (optional) maxLength, int: Maximum word length (optional)
Returns: WordObject Returns: WordObject
""" """
@ -360,7 +424,11 @@ class WordsApi(object):
responseObject = self.apiClient.deserialize(response, 'WordObject') responseObject = self.apiClient.deserialize(response, 'WordObject')
return responseObject return responseObject