forked from loafle/openapi-generator-original
Examples updated with names lower-camelized
This commit is contained in:
parent
6c4765fd00
commit
65b6d210bc
@ -15,11 +15,11 @@ object PetApi {
|
|||||||
* code 404 : (Pet not found)
|
* code 404 : (Pet not found)
|
||||||
* code 400 : (Invalid ID supplied)
|
* code 400 : (Invalid ID supplied)
|
||||||
*
|
*
|
||||||
* @param Body Pet object that needs to be added to the store
|
* @param body Pet object that needs to be added to the store
|
||||||
*/
|
*/
|
||||||
def updatePet(Body: Option[Pet] = None): ApiRequest[Unit] =
|
def updatePet(body: Option[Pet] = None): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.PUT, "http://petstore.swagger.io/v2", "/pet", "application/json")
|
ApiRequest[Unit](ApiMethods.PUT, "http://petstore.swagger.io/v2", "/pet", "application/json")
|
||||||
.withBody(Body)
|
.withBody(body)
|
||||||
.withErrorResponse[Unit](405)
|
.withErrorResponse[Unit](405)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
@ -29,11 +29,11 @@ object PetApi {
|
|||||||
* Expected answers:
|
* Expected answers:
|
||||||
* code 405 : (Invalid input)
|
* code 405 : (Invalid input)
|
||||||
*
|
*
|
||||||
* @param Body Pet object that needs to be added to the store
|
* @param body Pet object that needs to be added to the store
|
||||||
*/
|
*/
|
||||||
def addPet(Body: Option[Pet] = None): ApiRequest[Unit] =
|
def addPet(body: Option[Pet] = None): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/pet", "application/json")
|
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/pet", "application/json")
|
||||||
.withBody(Body)
|
.withBody(body)
|
||||||
.withErrorResponse[Unit](405)
|
.withErrorResponse[Unit](405)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -43,11 +43,11 @@ object PetApi {
|
|||||||
* code 200 : Seq[Pet] (successful operation)
|
* code 200 : Seq[Pet] (successful operation)
|
||||||
* code 400 : (Invalid status value)
|
* code 400 : (Invalid status value)
|
||||||
*
|
*
|
||||||
* @param Status Status values that need to be considered for filter
|
* @param status Status values that need to be considered for filter
|
||||||
*/
|
*/
|
||||||
def findPetsByStatus(Status: Seq[String]): ApiRequest[Seq[Pet]] =
|
def findPetsByStatus(status: Seq[String]): ApiRequest[Seq[Pet]] =
|
||||||
ApiRequest[Seq[Pet]](ApiMethods.GET, "http://petstore.swagger.io/v2", "/pet/findByStatus", "application/json")
|
ApiRequest[Seq[Pet]](ApiMethods.GET, "http://petstore.swagger.io/v2", "/pet/findByStatus", "application/json")
|
||||||
.withQueryParam("status", ArrayValues(Status, MULTI))
|
.withQueryParam("status", ArrayValues(status, MULTI))
|
||||||
.withSuccessResponse[Seq[Pet]](200)
|
.withSuccessResponse[Seq[Pet]](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -58,11 +58,11 @@ object PetApi {
|
|||||||
* code 200 : Seq[Pet] (successful operation)
|
* code 200 : Seq[Pet] (successful operation)
|
||||||
* code 400 : (Invalid tag value)
|
* code 400 : (Invalid tag value)
|
||||||
*
|
*
|
||||||
* @param Tags Tags to filter by
|
* @param tags Tags to filter by
|
||||||
*/
|
*/
|
||||||
def findPetsByTags(Tags: Seq[String]): ApiRequest[Seq[Pet]] =
|
def findPetsByTags(tags: Seq[String]): ApiRequest[Seq[Pet]] =
|
||||||
ApiRequest[Seq[Pet]](ApiMethods.GET, "http://petstore.swagger.io/v2", "/pet/findByTags", "application/json")
|
ApiRequest[Seq[Pet]](ApiMethods.GET, "http://petstore.swagger.io/v2", "/pet/findByTags", "application/json")
|
||||||
.withQueryParam("tags", ArrayValues(Tags, MULTI))
|
.withQueryParam("tags", ArrayValues(tags, MULTI))
|
||||||
.withSuccessResponse[Seq[Pet]](200)
|
.withSuccessResponse[Seq[Pet]](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -77,12 +77,12 @@ object PetApi {
|
|||||||
* Available security schemes:
|
* Available security schemes:
|
||||||
* api_key (apiKey)
|
* api_key (apiKey)
|
||||||
*
|
*
|
||||||
* @param PetId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched
|
||||||
*/
|
*/
|
||||||
def getPetById(PetId: Long)(implicit apiKey: ApiKeyValue): ApiRequest[Pet] =
|
def getPetById(petId: Long)(implicit apiKey: ApiKeyValue): ApiRequest[Pet] =
|
||||||
ApiRequest[Pet](ApiMethods.GET, "http://petstore.swagger.io/v2", "/pet/{petId}", "application/json")
|
ApiRequest[Pet](ApiMethods.GET, "http://petstore.swagger.io/v2", "/pet/{petId}", "application/json")
|
||||||
.withApiKey(apiKey, "api_key", HEADER)
|
.withApiKey(apiKey, "api_key", HEADER)
|
||||||
.withPathParam("petId", PetId)
|
.withPathParam("petId", petId)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
.withSuccessResponse[Pet](200)
|
.withSuccessResponse[Pet](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
@ -92,15 +92,15 @@ object PetApi {
|
|||||||
* Expected answers:
|
* Expected answers:
|
||||||
* code 405 : (Invalid input)
|
* code 405 : (Invalid input)
|
||||||
*
|
*
|
||||||
* @param PetId ID of pet that needs to be updated
|
* @param petId ID of pet that needs to be updated
|
||||||
* @param Name Updated name of the pet
|
* @param name Updated name of the pet
|
||||||
* @param Status Updated status of the pet
|
* @param status Updated status of the pet
|
||||||
*/
|
*/
|
||||||
def updatePetWithForm(PetId: String, Name: Option[String] = None, Status: Option[String] = None): ApiRequest[Unit] =
|
def updatePetWithForm(petId: String, name: Option[String] = None, status: Option[String] = None): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/pet/{petId}", "application/x-www-form-urlencoded")
|
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/pet/{petId}", "application/x-www-form-urlencoded")
|
||||||
.withFormParam("name", Name)
|
.withFormParam("name", name)
|
||||||
.withFormParam("status", Status)
|
.withFormParam("status", status)
|
||||||
.withPathParam("petId", PetId)
|
.withPathParam("petId", petId)
|
||||||
.withErrorResponse[Unit](405)
|
.withErrorResponse[Unit](405)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -108,13 +108,13 @@ object PetApi {
|
|||||||
* Expected answers:
|
* Expected answers:
|
||||||
* code 400 : (Invalid pet value)
|
* code 400 : (Invalid pet value)
|
||||||
*
|
*
|
||||||
* @param ApiKey
|
* @param apiKey
|
||||||
* @param PetId Pet id to delete
|
* @param petId Pet id to delete
|
||||||
*/
|
*/
|
||||||
def deletePet(ApiKey: Option[String] = None, PetId: Long): ApiRequest[Unit] =
|
def deletePet(apiKey: Option[String] = None, petId: Long): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.DELETE, "http://petstore.swagger.io/v2", "/pet/{petId}", "application/json")
|
ApiRequest[Unit](ApiMethods.DELETE, "http://petstore.swagger.io/v2", "/pet/{petId}", "application/json")
|
||||||
.withPathParam("petId", PetId)
|
.withPathParam("petId", petId)
|
||||||
.withHeaderParam("api_key", ApiKey)
|
.withHeaderParam("api_key", apiKey)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -122,15 +122,15 @@ object PetApi {
|
|||||||
* Expected answers:
|
* Expected answers:
|
||||||
* code 0 : (successful operation)
|
* code 0 : (successful operation)
|
||||||
*
|
*
|
||||||
* @param PetId ID of pet to update
|
* @param petId ID of pet to update
|
||||||
* @param AdditionalMetadata Additional data to pass to server
|
* @param additionalMetadata Additional data to pass to server
|
||||||
* @param File file to upload
|
* @param file file to upload
|
||||||
*/
|
*/
|
||||||
def uploadFile(PetId: Long, AdditionalMetadata: Option[String] = None, File: Option[File] = None): ApiRequest[Unit] =
|
def uploadFile(petId: Long, additionalMetadata: Option[String] = None, file: Option[File] = None): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/pet/{petId}/uploadImage", "multipart/form-data")
|
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/pet/{petId}/uploadImage", "multipart/form-data")
|
||||||
.withFormParam("additionalMetadata", AdditionalMetadata)
|
.withFormParam("additionalMetadata", additionalMetadata)
|
||||||
.withFormParam("file", File)
|
.withFormParam("file", file)
|
||||||
.withPathParam("petId", PetId)
|
.withPathParam("petId", petId)
|
||||||
.withDefaultSuccessResponse[Unit]
|
.withDefaultSuccessResponse[Unit]
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,11 +27,11 @@ object StoreApi {
|
|||||||
* code 200 : Order (successful operation)
|
* code 200 : Order (successful operation)
|
||||||
* code 400 : (Invalid Order)
|
* code 400 : (Invalid Order)
|
||||||
*
|
*
|
||||||
* @param Body order placed for purchasing the pet
|
* @param body order placed for purchasing the pet
|
||||||
*/
|
*/
|
||||||
def placeOrder(Body: Option[Order] = None): ApiRequest[Order] =
|
def placeOrder(body: Option[Order] = None): ApiRequest[Order] =
|
||||||
ApiRequest[Order](ApiMethods.POST, "http://petstore.swagger.io/v2", "/store/order", "application/json")
|
ApiRequest[Order](ApiMethods.POST, "http://petstore.swagger.io/v2", "/store/order", "application/json")
|
||||||
.withBody(Body)
|
.withBody(body)
|
||||||
.withSuccessResponse[Order](200)
|
.withSuccessResponse[Order](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -43,11 +43,11 @@ object StoreApi {
|
|||||||
* code 200 : Order (successful operation)
|
* code 200 : Order (successful operation)
|
||||||
* code 400 : (Invalid ID supplied)
|
* code 400 : (Invalid ID supplied)
|
||||||
*
|
*
|
||||||
* @param OrderId ID of pet that needs to be fetched
|
* @param orderId ID of pet that needs to be fetched
|
||||||
*/
|
*/
|
||||||
def getOrderById(OrderId: String): ApiRequest[Order] =
|
def getOrderById(orderId: String): ApiRequest[Order] =
|
||||||
ApiRequest[Order](ApiMethods.GET, "http://petstore.swagger.io/v2", "/store/order/{orderId}", "application/json")
|
ApiRequest[Order](ApiMethods.GET, "http://petstore.swagger.io/v2", "/store/order/{orderId}", "application/json")
|
||||||
.withPathParam("orderId", OrderId)
|
.withPathParam("orderId", orderId)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
.withSuccessResponse[Order](200)
|
.withSuccessResponse[Order](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
@ -59,11 +59,11 @@ object StoreApi {
|
|||||||
* code 404 : (Order not found)
|
* code 404 : (Order not found)
|
||||||
* code 400 : (Invalid ID supplied)
|
* code 400 : (Invalid ID supplied)
|
||||||
*
|
*
|
||||||
* @param OrderId ID of the order that needs to be deleted
|
* @param orderId ID of the order that needs to be deleted
|
||||||
*/
|
*/
|
||||||
def deleteOrder(OrderId: String): ApiRequest[Unit] =
|
def deleteOrder(orderId: String): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.DELETE, "http://petstore.swagger.io/v2", "/store/order/{orderId}", "application/json")
|
ApiRequest[Unit](ApiMethods.DELETE, "http://petstore.swagger.io/v2", "/store/order/{orderId}", "application/json")
|
||||||
.withPathParam("orderId", OrderId)
|
.withPathParam("orderId", orderId)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
|
@ -13,11 +13,11 @@ object UserApi {
|
|||||||
* Expected answers:
|
* Expected answers:
|
||||||
* code 0 : (successful operation)
|
* code 0 : (successful operation)
|
||||||
*
|
*
|
||||||
* @param Body Created user object
|
* @param body Created user object
|
||||||
*/
|
*/
|
||||||
def createUser(Body: Option[User] = None): ApiRequest[Unit] =
|
def createUser(body: Option[User] = None): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/user", "application/json")
|
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/user", "application/json")
|
||||||
.withBody(Body)
|
.withBody(body)
|
||||||
.withDefaultSuccessResponse[Unit]
|
.withDefaultSuccessResponse[Unit]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -25,11 +25,11 @@ object UserApi {
|
|||||||
* Expected answers:
|
* Expected answers:
|
||||||
* code 0 : (successful operation)
|
* code 0 : (successful operation)
|
||||||
*
|
*
|
||||||
* @param Body List of user object
|
* @param body List of user object
|
||||||
*/
|
*/
|
||||||
def createUsersWithArrayInput(Body: Seq[User]): ApiRequest[Unit] =
|
def createUsersWithArrayInput(body: Seq[User]): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/user/createWithArray", "application/json")
|
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/user/createWithArray", "application/json")
|
||||||
.withBody(Body)
|
.withBody(body)
|
||||||
.withDefaultSuccessResponse[Unit]
|
.withDefaultSuccessResponse[Unit]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -37,11 +37,11 @@ object UserApi {
|
|||||||
* Expected answers:
|
* Expected answers:
|
||||||
* code 0 : (successful operation)
|
* code 0 : (successful operation)
|
||||||
*
|
*
|
||||||
* @param Body List of user object
|
* @param body List of user object
|
||||||
*/
|
*/
|
||||||
def createUsersWithListInput(Body: Seq[User]): ApiRequest[Unit] =
|
def createUsersWithListInput(body: Seq[User]): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/user/createWithList", "application/json")
|
ApiRequest[Unit](ApiMethods.POST, "http://petstore.swagger.io/v2", "/user/createWithList", "application/json")
|
||||||
.withBody(Body)
|
.withBody(body)
|
||||||
.withDefaultSuccessResponse[Unit]
|
.withDefaultSuccessResponse[Unit]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -50,13 +50,13 @@ object UserApi {
|
|||||||
* code 200 : String (successful operation)
|
* code 200 : String (successful operation)
|
||||||
* code 400 : (Invalid username/password supplied)
|
* code 400 : (Invalid username/password supplied)
|
||||||
*
|
*
|
||||||
* @param Username The user name for login
|
* @param username The user name for login
|
||||||
* @param Password The password for login in clear text
|
* @param password The password for login in clear text
|
||||||
*/
|
*/
|
||||||
def loginUser(Username: Option[String] = None, Password: Option[String] = None): ApiRequest[String] =
|
def loginUser(username: Option[String] = None, password: Option[String] = None): ApiRequest[String] =
|
||||||
ApiRequest[String](ApiMethods.GET, "http://petstore.swagger.io/v2", "/user/login", "application/json")
|
ApiRequest[String](ApiMethods.GET, "http://petstore.swagger.io/v2", "/user/login", "application/json")
|
||||||
.withQueryParam("username", Username)
|
.withQueryParam("username", username)
|
||||||
.withQueryParam("password", Password)
|
.withQueryParam("password", password)
|
||||||
.withSuccessResponse[String](200)
|
.withSuccessResponse[String](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -76,11 +76,11 @@ object UserApi {
|
|||||||
* code 200 : User (successful operation)
|
* code 200 : User (successful operation)
|
||||||
* code 400 : (Invalid username supplied)
|
* code 400 : (Invalid username supplied)
|
||||||
*
|
*
|
||||||
* @param Username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
*/
|
*/
|
||||||
def getUserByName(Username: String): ApiRequest[User] =
|
def getUserByName(username: String): ApiRequest[User] =
|
||||||
ApiRequest[User](ApiMethods.GET, "http://petstore.swagger.io/v2", "/user/{username}", "application/json")
|
ApiRequest[User](ApiMethods.GET, "http://petstore.swagger.io/v2", "/user/{username}", "application/json")
|
||||||
.withPathParam("username", Username)
|
.withPathParam("username", username)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
.withSuccessResponse[User](200)
|
.withSuccessResponse[User](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
@ -92,13 +92,13 @@ object UserApi {
|
|||||||
* code 404 : (User not found)
|
* code 404 : (User not found)
|
||||||
* code 400 : (Invalid user supplied)
|
* code 400 : (Invalid user supplied)
|
||||||
*
|
*
|
||||||
* @param Username name that need to be deleted
|
* @param username name that need to be deleted
|
||||||
* @param Body Updated user object
|
* @param body Updated user object
|
||||||
*/
|
*/
|
||||||
def updateUser(Username: String, Body: Option[User] = None): ApiRequest[Unit] =
|
def updateUser(username: String, body: Option[User] = None): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.PUT, "http://petstore.swagger.io/v2", "/user/{username}", "application/json")
|
ApiRequest[Unit](ApiMethods.PUT, "http://petstore.swagger.io/v2", "/user/{username}", "application/json")
|
||||||
.withBody(Body)
|
.withBody(body)
|
||||||
.withPathParam("username", Username)
|
.withPathParam("username", username)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -109,11 +109,11 @@ object UserApi {
|
|||||||
* code 404 : (User not found)
|
* code 404 : (User not found)
|
||||||
* code 400 : (Invalid username supplied)
|
* code 400 : (Invalid username supplied)
|
||||||
*
|
*
|
||||||
* @param Username The name that needs to be deleted
|
* @param username The name that needs to be deleted
|
||||||
*/
|
*/
|
||||||
def deleteUser(Username: String): ApiRequest[Unit] =
|
def deleteUser(username: String): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.DELETE, "http://petstore.swagger.io/v2", "/user/{username}", "application/json")
|
ApiRequest[Unit](ApiMethods.DELETE, "http://petstore.swagger.io/v2", "/user/{username}", "application/json")
|
||||||
.withPathParam("username", Username)
|
.withPathParam("username", username)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Category (
|
case class Category (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
Name: Option[String])
|
name: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,13 +5,13 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Order (
|
case class Order (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
PetId: Option[Long],
|
petId: Option[Long],
|
||||||
Quantity: Option[Int],
|
quantity: Option[Int],
|
||||||
ShipDate: Option[DateTime],
|
shipDate: Option[DateTime],
|
||||||
/* Order Status */
|
/* Order Status */
|
||||||
Status: Option[OrderEnums.Status],
|
status: Option[OrderEnums.Status],
|
||||||
Complete: Option[Boolean])
|
complete: Option[Boolean])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
object OrderEnums {
|
object OrderEnums {
|
||||||
|
@ -5,13 +5,13 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Pet (
|
case class Pet (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
Category: Option[Category],
|
category: Option[Category],
|
||||||
Name: String,
|
name: String,
|
||||||
PhotoUrls: Seq[String],
|
photoUrls: Seq[String],
|
||||||
Tags: Option[Seq[Tag]],
|
tags: Option[Seq[Tag]],
|
||||||
/* pet status in the store */
|
/* pet status in the store */
|
||||||
Status: Option[PetEnums.Status])
|
status: Option[PetEnums.Status])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
object PetEnums {
|
object PetEnums {
|
||||||
|
@ -5,8 +5,8 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Tag (
|
case class Tag (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
Name: Option[String])
|
name: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,15 +5,15 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class User (
|
case class User (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
Username: Option[String],
|
username: Option[String],
|
||||||
FirstName: Option[String],
|
firstName: Option[String],
|
||||||
LastName: Option[String],
|
lastName: Option[String],
|
||||||
Email: Option[String],
|
email: Option[String],
|
||||||
Password: Option[String],
|
password: Option[String],
|
||||||
Phone: Option[String],
|
phone: Option[String],
|
||||||
/* User Status */
|
/* User Status */
|
||||||
UserStatus: Option[Int])
|
userStatus: Option[Int])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,11 +18,11 @@ object AccountApi {
|
|||||||
* code 400 : (No token supplied.)
|
* code 400 : (No token supplied.)
|
||||||
* code 404 : (No API account with supplied token.)
|
* code 404 : (No API account with supplied token.)
|
||||||
*
|
*
|
||||||
* @param ApiKey Wordnik authentication token
|
* @param apiKey Wordnik authentication token
|
||||||
*/
|
*/
|
||||||
def getApiTokenStatus(ApiKey: Option[String] = None): ApiRequest[ApiTokenStatus] =
|
def getApiTokenStatus(apiKey: Option[String] = None): ApiRequest[ApiTokenStatus] =
|
||||||
ApiRequest[ApiTokenStatus](ApiMethods.GET, "https://api.wordnik.com/v4", "/account.json/apiTokenStatus", "application/json")
|
ApiRequest[ApiTokenStatus](ApiMethods.GET, "https://api.wordnik.com/v4", "/account.json/apiTokenStatus", "application/json")
|
||||||
.withHeaderParam("api_key", ApiKey)
|
.withHeaderParam("api_key", apiKey)
|
||||||
.withSuccessResponse[ApiTokenStatus](200)
|
.withSuccessResponse[ApiTokenStatus](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
@ -35,13 +35,13 @@ object AccountApi {
|
|||||||
* code 403 : (Account not available.)
|
* code 403 : (Account not available.)
|
||||||
* code 404 : (User not found.)
|
* code 404 : (User not found.)
|
||||||
*
|
*
|
||||||
* @param Username A confirmed Wordnik username
|
* @param username A confirmed Wordnik username
|
||||||
* @param Password The user's password
|
* @param password The user's password
|
||||||
*/
|
*/
|
||||||
def authenticate(Username: String, Password: String): ApiRequest[AuthenticationToken] =
|
def authenticate(username: String, password: String): ApiRequest[AuthenticationToken] =
|
||||||
ApiRequest[AuthenticationToken](ApiMethods.GET, "https://api.wordnik.com/v4", "/account.json/authenticate/{username}", "application/json")
|
ApiRequest[AuthenticationToken](ApiMethods.GET, "https://api.wordnik.com/v4", "/account.json/authenticate/{username}", "application/json")
|
||||||
.withQueryParam("password", Password)
|
.withQueryParam("password", password)
|
||||||
.withPathParam("username", Username)
|
.withPathParam("username", username)
|
||||||
.withSuccessResponse[AuthenticationToken](200)
|
.withSuccessResponse[AuthenticationToken](200)
|
||||||
.withErrorResponse[Unit](403)
|
.withErrorResponse[Unit](403)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
@ -54,13 +54,13 @@ object AccountApi {
|
|||||||
* code 403 : (Account not available.)
|
* code 403 : (Account not available.)
|
||||||
* code 404 : (User not found.)
|
* code 404 : (User not found.)
|
||||||
*
|
*
|
||||||
* @param Username A confirmed Wordnik username
|
* @param username A confirmed Wordnik username
|
||||||
* @param Body The user's password
|
* @param body The user's password
|
||||||
*/
|
*/
|
||||||
def authenticatePost(Username: String, Body: String): ApiRequest[AuthenticationToken] =
|
def authenticatePost(username: String, body: String): ApiRequest[AuthenticationToken] =
|
||||||
ApiRequest[AuthenticationToken](ApiMethods.POST, "https://api.wordnik.com/v4", "/account.json/authenticate/{username}", "application/json")
|
ApiRequest[AuthenticationToken](ApiMethods.POST, "https://api.wordnik.com/v4", "/account.json/authenticate/{username}", "application/json")
|
||||||
.withBody(Body)
|
.withBody(body)
|
||||||
.withPathParam("username", Username)
|
.withPathParam("username", username)
|
||||||
.withSuccessResponse[AuthenticationToken](200)
|
.withSuccessResponse[AuthenticationToken](200)
|
||||||
.withErrorResponse[Unit](403)
|
.withErrorResponse[Unit](403)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
@ -73,11 +73,11 @@ object AccountApi {
|
|||||||
* code 403 : (Not logged in.)
|
* code 403 : (Not logged in.)
|
||||||
* code 404 : (User not found.)
|
* code 404 : (User not found.)
|
||||||
*
|
*
|
||||||
* @param AuthToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
* @param authToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
||||||
*/
|
*/
|
||||||
def getLoggedInUser(AuthToken: String): ApiRequest[User] =
|
def getLoggedInUser(authToken: String): ApiRequest[User] =
|
||||||
ApiRequest[User](ApiMethods.GET, "https://api.wordnik.com/v4", "/account.json/user", "application/json")
|
ApiRequest[User](ApiMethods.GET, "https://api.wordnik.com/v4", "/account.json/user", "application/json")
|
||||||
.withHeaderParam("auth_token", AuthToken)
|
.withHeaderParam("auth_token", authToken)
|
||||||
.withSuccessResponse[User](200)
|
.withSuccessResponse[User](200)
|
||||||
.withErrorResponse[Unit](403)
|
.withErrorResponse[Unit](403)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
@ -90,15 +90,15 @@ object AccountApi {
|
|||||||
* code 403 : (Not authenticated.)
|
* code 403 : (Not authenticated.)
|
||||||
* code 404 : (User account not found.)
|
* code 404 : (User account not found.)
|
||||||
*
|
*
|
||||||
* @param AuthToken auth_token of logged-in user
|
* @param authToken auth_token of logged-in user
|
||||||
* @param Skip Results to skip
|
* @param skip Results to skip
|
||||||
* @param Limit Maximum number of results to return
|
* @param limit Maximum number of results to return
|
||||||
*/
|
*/
|
||||||
def getWordListsForLoggedInUser(AuthToken: String, Skip: Option[Int] = None, Limit: Option[Int] = None): ApiRequest[Seq[WordList]] =
|
def getWordListsForLoggedInUser(authToken: String, skip: Option[Int] = None, limit: Option[Int] = None): ApiRequest[Seq[WordList]] =
|
||||||
ApiRequest[Seq[WordList]](ApiMethods.GET, "https://api.wordnik.com/v4", "/account.json/wordLists", "application/json")
|
ApiRequest[Seq[WordList]](ApiMethods.GET, "https://api.wordnik.com/v4", "/account.json/wordLists", "application/json")
|
||||||
.withQueryParam("skip", Skip)
|
.withQueryParam("skip", skip)
|
||||||
.withQueryParam("limit", Limit)
|
.withQueryParam("limit", limit)
|
||||||
.withHeaderParam("auth_token", AuthToken)
|
.withHeaderParam("auth_token", authToken)
|
||||||
.withSuccessResponse[Seq[WordList]](200)
|
.withSuccessResponse[Seq[WordList]](200)
|
||||||
.withErrorResponse[Unit](403)
|
.withErrorResponse[Unit](403)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
|
@ -19,15 +19,15 @@ object WordApi {
|
|||||||
* code 200 : WordObject (success)
|
* code 200 : WordObject (success)
|
||||||
* code 400 : (Invalid word supplied.)
|
* code 400 : (Invalid word supplied.)
|
||||||
*
|
*
|
||||||
* @param Word String value of WordObject to return
|
* @param word String value of WordObject to return
|
||||||
* @param UseCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
* @param useCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
||||||
* @param IncludeSuggestions Return suggestions (for correct spelling, case variants, etc.)
|
* @param includeSuggestions Return suggestions (for correct spelling, case variants, etc.)
|
||||||
*/
|
*/
|
||||||
def getWord(Word: String, UseCanonical: Option[String] = None, IncludeSuggestions: Option[String] = None): ApiRequest[WordObject] =
|
def getWord(word: String, useCanonical: Option[String] = None, includeSuggestions: Option[String] = None): ApiRequest[WordObject] =
|
||||||
ApiRequest[WordObject](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}", "application/json")
|
ApiRequest[WordObject](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}", "application/json")
|
||||||
.withQueryParam("useCanonical", UseCanonical)
|
.withQueryParam("useCanonical", useCanonical)
|
||||||
.withQueryParam("includeSuggestions", IncludeSuggestions)
|
.withQueryParam("includeSuggestions", includeSuggestions)
|
||||||
.withPathParam("word", Word)
|
.withPathParam("word", word)
|
||||||
.withSuccessResponse[WordObject](200)
|
.withSuccessResponse[WordObject](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -38,15 +38,15 @@ object WordApi {
|
|||||||
* code 200 : Seq[AudioFile] (success)
|
* code 200 : Seq[AudioFile] (success)
|
||||||
* code 400 : (Invalid word supplied.)
|
* code 400 : (Invalid word supplied.)
|
||||||
*
|
*
|
||||||
* @param Word Word to get audio for.
|
* @param word Word to get audio for.
|
||||||
* @param UseCanonical Use the canonical form of the word
|
* @param useCanonical Use the canonical form of the word
|
||||||
* @param Limit Maximum number of results to return
|
* @param limit Maximum number of results to return
|
||||||
*/
|
*/
|
||||||
def getAudio(Word: String, UseCanonical: Option[String] = None, Limit: Option[Int] = None): ApiRequest[Seq[AudioFile]] =
|
def getAudio(word: String, useCanonical: Option[String] = None, limit: Option[Int] = None): ApiRequest[Seq[AudioFile]] =
|
||||||
ApiRequest[Seq[AudioFile]](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/audio", "application/json")
|
ApiRequest[Seq[AudioFile]](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/audio", "application/json")
|
||||||
.withQueryParam("useCanonical", UseCanonical)
|
.withQueryParam("useCanonical", useCanonical)
|
||||||
.withQueryParam("limit", Limit)
|
.withQueryParam("limit", limit)
|
||||||
.withPathParam("word", Word)
|
.withPathParam("word", word)
|
||||||
.withSuccessResponse[Seq[AudioFile]](200)
|
.withSuccessResponse[Seq[AudioFile]](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -58,23 +58,23 @@ object WordApi {
|
|||||||
* code 400 : (Invalid word supplied.)
|
* code 400 : (Invalid word supplied.)
|
||||||
* code 404 : (No definitions found.)
|
* code 404 : (No definitions found.)
|
||||||
*
|
*
|
||||||
* @param Word Word to return definitions for
|
* @param word Word to return definitions for
|
||||||
* @param Limit Maximum number of results to return
|
* @param limit Maximum number of results to return
|
||||||
* @param PartOfSpeech CSV list of part-of-speech types
|
* @param partOfSpeech CSV list of part-of-speech types
|
||||||
* @param IncludeRelated Return related words with definitions
|
* @param includeRelated Return related words with definitions
|
||||||
* @param SourceDictionaries 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
|
* @param sourceDictionaries 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
|
||||||
* @param UseCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
* @param useCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
||||||
* @param IncludeTags Return a closed set of XML tags in response
|
* @param includeTags Return a closed set of XML tags in response
|
||||||
*/
|
*/
|
||||||
def getDefinitions(Word: String, Limit: Option[Int] = None, PartOfSpeech: Option[String] = None, IncludeRelated: Option[String] = None, SourceDictionaries: Seq[String], UseCanonical: Option[String] = None, IncludeTags: Option[String] = None): ApiRequest[Seq[Definition]] =
|
def getDefinitions(word: String, limit: Option[Int] = None, partOfSpeech: Option[String] = None, includeRelated: Option[String] = None, sourceDictionaries: Seq[String], useCanonical: Option[String] = None, includeTags: Option[String] = None): ApiRequest[Seq[Definition]] =
|
||||||
ApiRequest[Seq[Definition]](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/definitions", "application/json")
|
ApiRequest[Seq[Definition]](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/definitions", "application/json")
|
||||||
.withQueryParam("limit", Limit)
|
.withQueryParam("limit", limit)
|
||||||
.withQueryParam("partOfSpeech", PartOfSpeech)
|
.withQueryParam("partOfSpeech", partOfSpeech)
|
||||||
.withQueryParam("includeRelated", IncludeRelated)
|
.withQueryParam("includeRelated", includeRelated)
|
||||||
.withQueryParam("sourceDictionaries", ArrayValues(SourceDictionaries, CSV))
|
.withQueryParam("sourceDictionaries", ArrayValues(sourceDictionaries, CSV))
|
||||||
.withQueryParam("useCanonical", UseCanonical)
|
.withQueryParam("useCanonical", useCanonical)
|
||||||
.withQueryParam("includeTags", IncludeTags)
|
.withQueryParam("includeTags", includeTags)
|
||||||
.withPathParam("word", Word)
|
.withPathParam("word", word)
|
||||||
.withSuccessResponse[Seq[Definition]](200)
|
.withSuccessResponse[Seq[Definition]](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
@ -87,13 +87,13 @@ object WordApi {
|
|||||||
* code 400 : (Invalid word supplied.)
|
* code 400 : (Invalid word supplied.)
|
||||||
* code 404 : (No definitions found.)
|
* code 404 : (No definitions found.)
|
||||||
*
|
*
|
||||||
* @param Word Word to return
|
* @param word Word to return
|
||||||
* @param UseCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
* @param useCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
||||||
*/
|
*/
|
||||||
def getEtymologies(Word: String, UseCanonical: Option[String] = None): ApiRequest[Seq[String]] =
|
def getEtymologies(word: String, useCanonical: Option[String] = None): ApiRequest[Seq[String]] =
|
||||||
ApiRequest[Seq[String]](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/etymologies", "application/json")
|
ApiRequest[Seq[String]](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/etymologies", "application/json")
|
||||||
.withQueryParam("useCanonical", UseCanonical)
|
.withQueryParam("useCanonical", useCanonical)
|
||||||
.withPathParam("word", Word)
|
.withPathParam("word", word)
|
||||||
.withSuccessResponse[Seq[String]](200)
|
.withSuccessResponse[Seq[String]](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
@ -105,19 +105,19 @@ object WordApi {
|
|||||||
* code 200 : (success)
|
* code 200 : (success)
|
||||||
* code 400 : (Invalid word supplied.)
|
* code 400 : (Invalid word supplied.)
|
||||||
*
|
*
|
||||||
* @param Word Word to return examples for
|
* @param word Word to return examples for
|
||||||
* @param IncludeDuplicates Show duplicate examples from different sources
|
* @param includeDuplicates Show duplicate examples from different sources
|
||||||
* @param UseCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
* @param useCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
||||||
* @param Skip Results to skip
|
* @param skip Results to skip
|
||||||
* @param Limit Maximum number of results to return
|
* @param limit Maximum number of results to return
|
||||||
*/
|
*/
|
||||||
def getExamples(Word: String, IncludeDuplicates: Option[String] = None, UseCanonical: Option[String] = None, Skip: Option[Int] = None, Limit: Option[Int] = None): ApiRequest[Unit] =
|
def getExamples(word: String, includeDuplicates: Option[String] = None, useCanonical: Option[String] = None, skip: Option[Int] = None, limit: Option[Int] = None): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/examples", "application/json")
|
ApiRequest[Unit](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/examples", "application/json")
|
||||||
.withQueryParam("includeDuplicates", IncludeDuplicates)
|
.withQueryParam("includeDuplicates", includeDuplicates)
|
||||||
.withQueryParam("useCanonical", UseCanonical)
|
.withQueryParam("useCanonical", useCanonical)
|
||||||
.withQueryParam("skip", Skip)
|
.withQueryParam("skip", skip)
|
||||||
.withQueryParam("limit", Limit)
|
.withQueryParam("limit", limit)
|
||||||
.withPathParam("word", Word)
|
.withPathParam("word", word)
|
||||||
.withSuccessResponse[Unit](200)
|
.withSuccessResponse[Unit](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -129,17 +129,17 @@ object WordApi {
|
|||||||
* code 400 : (Invalid word supplied.)
|
* code 400 : (Invalid word supplied.)
|
||||||
* code 404 : (No results.)
|
* code 404 : (No results.)
|
||||||
*
|
*
|
||||||
* @param Word Word to return
|
* @param word Word to return
|
||||||
* @param UseCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
* @param useCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
||||||
* @param StartYear Starting Year
|
* @param startYear Starting Year
|
||||||
* @param EndYear Ending Year
|
* @param endYear Ending Year
|
||||||
*/
|
*/
|
||||||
def getWordFrequency(Word: String, UseCanonical: Option[String] = None, StartYear: Option[Int] = None, EndYear: Option[Int] = None): ApiRequest[FrequencySummary] =
|
def getWordFrequency(word: String, useCanonical: Option[String] = None, startYear: Option[Int] = None, endYear: Option[Int] = None): ApiRequest[FrequencySummary] =
|
||||||
ApiRequest[FrequencySummary](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/frequency", "application/json")
|
ApiRequest[FrequencySummary](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/frequency", "application/json")
|
||||||
.withQueryParam("useCanonical", UseCanonical)
|
.withQueryParam("useCanonical", useCanonical)
|
||||||
.withQueryParam("startYear", StartYear)
|
.withQueryParam("startYear", startYear)
|
||||||
.withQueryParam("endYear", EndYear)
|
.withQueryParam("endYear", endYear)
|
||||||
.withPathParam("word", Word)
|
.withPathParam("word", word)
|
||||||
.withSuccessResponse[FrequencySummary](200)
|
.withSuccessResponse[FrequencySummary](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
@ -151,17 +151,17 @@ object WordApi {
|
|||||||
* code 200 : (success)
|
* code 200 : (success)
|
||||||
* code 400 : (Invalid word supplied.)
|
* code 400 : (Invalid word supplied.)
|
||||||
*
|
*
|
||||||
* @param Word Word to get syllables for
|
* @param word Word to get syllables for
|
||||||
* @param UseCanonical If true will try to return a correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
* @param useCanonical If true will try to return a correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
||||||
* @param SourceDictionary Get from a single dictionary. Valid options: ahd, century, wiktionary, webster, and wordnet.
|
* @param sourceDictionary Get from a single dictionary. Valid options: ahd, century, wiktionary, webster, and wordnet.
|
||||||
* @param Limit Maximum number of results to return
|
* @param limit Maximum number of results to return
|
||||||
*/
|
*/
|
||||||
def getHyphenation(Word: String, UseCanonical: Option[String] = None, SourceDictionary: Option[String] = None, Limit: Option[Int] = None): ApiRequest[Unit] =
|
def getHyphenation(word: String, useCanonical: Option[String] = None, sourceDictionary: Option[String] = None, limit: Option[Int] = None): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/hyphenation", "application/json")
|
ApiRequest[Unit](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/hyphenation", "application/json")
|
||||||
.withQueryParam("useCanonical", UseCanonical)
|
.withQueryParam("useCanonical", useCanonical)
|
||||||
.withQueryParam("sourceDictionary", SourceDictionary)
|
.withQueryParam("sourceDictionary", sourceDictionary)
|
||||||
.withQueryParam("limit", Limit)
|
.withQueryParam("limit", limit)
|
||||||
.withPathParam("word", Word)
|
.withPathParam("word", word)
|
||||||
.withSuccessResponse[Unit](200)
|
.withSuccessResponse[Unit](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -172,17 +172,17 @@ object WordApi {
|
|||||||
* code 200 : Seq[Bigram] (success)
|
* code 200 : Seq[Bigram] (success)
|
||||||
* code 400 : (Invalid word supplied.)
|
* code 400 : (Invalid word supplied.)
|
||||||
*
|
*
|
||||||
* @param Word Word to fetch phrases for
|
* @param word Word to fetch phrases for
|
||||||
* @param Limit Maximum number of results to return
|
* @param limit Maximum number of results to return
|
||||||
* @param Wlmi Minimum WLMI for the phrase
|
* @param wlmi Minimum WLMI for the phrase
|
||||||
* @param UseCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
* @param useCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
||||||
*/
|
*/
|
||||||
def getPhrases(Word: String, Limit: Option[Int] = None, Wlmi: Option[Int] = None, UseCanonical: Option[String] = None): ApiRequest[Seq[Bigram]] =
|
def getPhrases(word: String, limit: Option[Int] = None, wlmi: Option[Int] = None, useCanonical: Option[String] = None): ApiRequest[Seq[Bigram]] =
|
||||||
ApiRequest[Seq[Bigram]](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/phrases", "application/json")
|
ApiRequest[Seq[Bigram]](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/phrases", "application/json")
|
||||||
.withQueryParam("limit", Limit)
|
.withQueryParam("limit", limit)
|
||||||
.withQueryParam("wlmi", Wlmi)
|
.withQueryParam("wlmi", wlmi)
|
||||||
.withQueryParam("useCanonical", UseCanonical)
|
.withQueryParam("useCanonical", useCanonical)
|
||||||
.withPathParam("word", Word)
|
.withPathParam("word", word)
|
||||||
.withSuccessResponse[Seq[Bigram]](200)
|
.withSuccessResponse[Seq[Bigram]](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -193,19 +193,19 @@ object WordApi {
|
|||||||
* code 200 : (success)
|
* code 200 : (success)
|
||||||
* code 400 : (Invalid word supplied.)
|
* code 400 : (Invalid word supplied.)
|
||||||
*
|
*
|
||||||
* @param Word Word to get pronunciations for
|
* @param word Word to get pronunciations for
|
||||||
* @param UseCanonical If true will try to return a correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
* @param useCanonical If true will try to return a correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
||||||
* @param SourceDictionary Get from a single dictionary
|
* @param sourceDictionary Get from a single dictionary
|
||||||
* @param TypeFormat Text pronunciation type
|
* @param typeFormat Text pronunciation type
|
||||||
* @param Limit Maximum number of results to return
|
* @param limit Maximum number of results to return
|
||||||
*/
|
*/
|
||||||
def getTextPronunciations(Word: String, UseCanonical: Option[String] = None, SourceDictionary: Option[String] = None, TypeFormat: Option[String] = None, Limit: Option[Int] = None): ApiRequest[Unit] =
|
def getTextPronunciations(word: String, useCanonical: Option[String] = None, sourceDictionary: Option[String] = None, typeFormat: Option[String] = None, limit: Option[Int] = None): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/pronunciations", "application/json")
|
ApiRequest[Unit](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/pronunciations", "application/json")
|
||||||
.withQueryParam("useCanonical", UseCanonical)
|
.withQueryParam("useCanonical", useCanonical)
|
||||||
.withQueryParam("sourceDictionary", SourceDictionary)
|
.withQueryParam("sourceDictionary", sourceDictionary)
|
||||||
.withQueryParam("typeFormat", TypeFormat)
|
.withQueryParam("typeFormat", typeFormat)
|
||||||
.withQueryParam("limit", Limit)
|
.withQueryParam("limit", limit)
|
||||||
.withPathParam("word", Word)
|
.withPathParam("word", word)
|
||||||
.withSuccessResponse[Unit](200)
|
.withSuccessResponse[Unit](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -216,17 +216,17 @@ object WordApi {
|
|||||||
* code 200 : (success)
|
* code 200 : (success)
|
||||||
* code 400 : (Invalid word supplied.)
|
* code 400 : (Invalid word supplied.)
|
||||||
*
|
*
|
||||||
* @param Word Word to fetch relationships for
|
* @param word Word to fetch relationships for
|
||||||
* @param UseCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
* @param useCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
||||||
* @param RelationshipTypes Limits the total results per type of relationship type
|
* @param relationshipTypes Limits the total results per type of relationship type
|
||||||
* @param LimitPerRelationshipType Restrict to the supplied relationship types
|
* @param limitPerRelationshipType Restrict to the supplied relationship types
|
||||||
*/
|
*/
|
||||||
def getRelatedWords(Word: String, UseCanonical: Option[String] = None, RelationshipTypes: Option[String] = None, LimitPerRelationshipType: Option[Int] = None): ApiRequest[Unit] =
|
def getRelatedWords(word: String, useCanonical: Option[String] = None, relationshipTypes: Option[String] = None, limitPerRelationshipType: Option[Int] = None): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/relatedWords", "application/json")
|
ApiRequest[Unit](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/relatedWords", "application/json")
|
||||||
.withQueryParam("useCanonical", UseCanonical)
|
.withQueryParam("useCanonical", useCanonical)
|
||||||
.withQueryParam("relationshipTypes", RelationshipTypes)
|
.withQueryParam("relationshipTypes", relationshipTypes)
|
||||||
.withQueryParam("limitPerRelationshipType", LimitPerRelationshipType)
|
.withQueryParam("limitPerRelationshipType", limitPerRelationshipType)
|
||||||
.withPathParam("word", Word)
|
.withPathParam("word", word)
|
||||||
.withSuccessResponse[Unit](200)
|
.withSuccessResponse[Unit](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -237,13 +237,13 @@ object WordApi {
|
|||||||
* code 200 : Example (success)
|
* code 200 : Example (success)
|
||||||
* code 400 : (Invalid word supplied.)
|
* code 400 : (Invalid word supplied.)
|
||||||
*
|
*
|
||||||
* @param Word Word to fetch examples for
|
* @param word Word to fetch examples for
|
||||||
* @param UseCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
* @param useCanonical If true will try to return the correct word root ('cats' -> 'cat'). If false returns exactly what was requested.
|
||||||
*/
|
*/
|
||||||
def getTopExample(Word: String, UseCanonical: Option[String] = None): ApiRequest[Example] =
|
def getTopExample(word: String, useCanonical: Option[String] = None): ApiRequest[Example] =
|
||||||
ApiRequest[Example](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/topExample", "application/json")
|
ApiRequest[Example](ApiMethods.GET, "https://api.wordnik.com/v4", "/word.json/{word}/topExample", "application/json")
|
||||||
.withQueryParam("useCanonical", UseCanonical)
|
.withQueryParam("useCanonical", useCanonical)
|
||||||
.withPathParam("word", Word)
|
.withPathParam("word", word)
|
||||||
.withSuccessResponse[Example](200)
|
.withSuccessResponse[Example](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
|
@ -17,13 +17,13 @@ object WordListApi {
|
|||||||
* code 403 : (Not Authorized to access WordList)
|
* code 403 : (Not Authorized to access WordList)
|
||||||
* code 404 : (WordList not found)
|
* code 404 : (WordList not found)
|
||||||
*
|
*
|
||||||
* @param Permalink permalink of WordList to fetch
|
* @param permalink permalink of WordList to fetch
|
||||||
* @param AuthToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
* @param authToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
||||||
*/
|
*/
|
||||||
def getWordListByPermalink(Permalink: String, AuthToken: String): ApiRequest[WordList] =
|
def getWordListByPermalink(permalink: String, authToken: String): ApiRequest[WordList] =
|
||||||
ApiRequest[WordList](ApiMethods.GET, "https://api.wordnik.com/v4", "/wordList.json/{permalink}", "application/json")
|
ApiRequest[WordList](ApiMethods.GET, "https://api.wordnik.com/v4", "/wordList.json/{permalink}", "application/json")
|
||||||
.withPathParam("permalink", Permalink)
|
.withPathParam("permalink", permalink)
|
||||||
.withHeaderParam("auth_token", AuthToken)
|
.withHeaderParam("auth_token", authToken)
|
||||||
.withSuccessResponse[WordList](200)
|
.withSuccessResponse[WordList](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
.withErrorResponse[Unit](403)
|
.withErrorResponse[Unit](403)
|
||||||
@ -38,15 +38,15 @@ object WordListApi {
|
|||||||
* code 403 : (Not Authorized to update WordList)
|
* code 403 : (Not Authorized to update WordList)
|
||||||
* code 404 : (WordList not found)
|
* code 404 : (WordList not found)
|
||||||
*
|
*
|
||||||
* @param Permalink permalink of WordList to update
|
* @param permalink permalink of WordList to update
|
||||||
* @param Body Updated WordList
|
* @param body Updated WordList
|
||||||
* @param AuthToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
* @param authToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
||||||
*/
|
*/
|
||||||
def updateWordList(Permalink: String, Body: Option[WordList] = None, AuthToken: String): ApiRequest[Unit] =
|
def updateWordList(permalink: String, body: Option[WordList] = None, authToken: String): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.PUT, "https://api.wordnik.com/v4", "/wordList.json/{permalink}", "application/json")
|
ApiRequest[Unit](ApiMethods.PUT, "https://api.wordnik.com/v4", "/wordList.json/{permalink}", "application/json")
|
||||||
.withBody(Body)
|
.withBody(body)
|
||||||
.withPathParam("permalink", Permalink)
|
.withPathParam("permalink", permalink)
|
||||||
.withHeaderParam("auth_token", AuthToken)
|
.withHeaderParam("auth_token", authToken)
|
||||||
.withSuccessResponse[Unit](200)
|
.withSuccessResponse[Unit](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
.withErrorResponse[Unit](403)
|
.withErrorResponse[Unit](403)
|
||||||
@ -61,13 +61,13 @@ object WordListApi {
|
|||||||
* code 403 : (Not Authorized to delete WordList)
|
* code 403 : (Not Authorized to delete WordList)
|
||||||
* code 404 : (WordList not found)
|
* code 404 : (WordList not found)
|
||||||
*
|
*
|
||||||
* @param Permalink ID of WordList to delete
|
* @param permalink ID of WordList to delete
|
||||||
* @param AuthToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
* @param authToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
||||||
*/
|
*/
|
||||||
def deleteWordList(Permalink: String, AuthToken: String): ApiRequest[Unit] =
|
def deleteWordList(permalink: String, authToken: String): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.DELETE, "https://api.wordnik.com/v4", "/wordList.json/{permalink}", "application/json")
|
ApiRequest[Unit](ApiMethods.DELETE, "https://api.wordnik.com/v4", "/wordList.json/{permalink}", "application/json")
|
||||||
.withPathParam("permalink", Permalink)
|
.withPathParam("permalink", permalink)
|
||||||
.withHeaderParam("auth_token", AuthToken)
|
.withHeaderParam("auth_token", authToken)
|
||||||
.withSuccessResponse[Unit](200)
|
.withSuccessResponse[Unit](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
.withErrorResponse[Unit](403)
|
.withErrorResponse[Unit](403)
|
||||||
@ -82,15 +82,15 @@ object WordListApi {
|
|||||||
* code 403 : (Not Authorized to modify WordList)
|
* code 403 : (Not Authorized to modify WordList)
|
||||||
* code 404 : (WordList not found)
|
* code 404 : (WordList not found)
|
||||||
*
|
*
|
||||||
* @param Permalink permalink of WordList to use
|
* @param permalink permalink of WordList to use
|
||||||
* @param Body Words to remove from WordList
|
* @param body Words to remove from WordList
|
||||||
* @param AuthToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
* @param authToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
||||||
*/
|
*/
|
||||||
def deleteWordsFromWordList(Permalink: String, Body: Seq[StringValue], AuthToken: String): ApiRequest[Unit] =
|
def deleteWordsFromWordList(permalink: String, body: Seq[StringValue], authToken: String): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.POST, "https://api.wordnik.com/v4", "/wordList.json/{permalink}/deleteWords", "application/json")
|
ApiRequest[Unit](ApiMethods.POST, "https://api.wordnik.com/v4", "/wordList.json/{permalink}/deleteWords", "application/json")
|
||||||
.withBody(Body)
|
.withBody(body)
|
||||||
.withPathParam("permalink", Permalink)
|
.withPathParam("permalink", permalink)
|
||||||
.withHeaderParam("auth_token", AuthToken)
|
.withHeaderParam("auth_token", authToken)
|
||||||
.withSuccessResponse[Unit](200)
|
.withSuccessResponse[Unit](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
.withErrorResponse[Unit](403)
|
.withErrorResponse[Unit](403)
|
||||||
@ -105,21 +105,21 @@ object WordListApi {
|
|||||||
* code 403 : (Not Authorized to access WordList)
|
* code 403 : (Not Authorized to access WordList)
|
||||||
* code 404 : (WordList not found)
|
* code 404 : (WordList not found)
|
||||||
*
|
*
|
||||||
* @param Permalink ID of WordList to use
|
* @param permalink ID of WordList to use
|
||||||
* @param SortBy Field to sort by
|
* @param sortBy Field to sort by
|
||||||
* @param SortOrder Direction to sort
|
* @param sortOrder Direction to sort
|
||||||
* @param Skip Results to skip
|
* @param skip Results to skip
|
||||||
* @param Limit Maximum number of results to return
|
* @param limit Maximum number of results to return
|
||||||
* @param AuthToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
* @param authToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
||||||
*/
|
*/
|
||||||
def getWordListWords(Permalink: String, SortBy: Option[String] = None, SortOrder: Option[String] = None, Skip: Option[Int] = None, Limit: Option[Int] = None, AuthToken: String): ApiRequest[Unit] =
|
def getWordListWords(permalink: String, sortBy: Option[String] = None, sortOrder: Option[String] = None, skip: Option[Int] = None, limit: Option[Int] = None, authToken: String): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.GET, "https://api.wordnik.com/v4", "/wordList.json/{permalink}/words", "application/json")
|
ApiRequest[Unit](ApiMethods.GET, "https://api.wordnik.com/v4", "/wordList.json/{permalink}/words", "application/json")
|
||||||
.withQueryParam("sortBy", SortBy)
|
.withQueryParam("sortBy", sortBy)
|
||||||
.withQueryParam("sortOrder", SortOrder)
|
.withQueryParam("sortOrder", sortOrder)
|
||||||
.withQueryParam("skip", Skip)
|
.withQueryParam("skip", skip)
|
||||||
.withQueryParam("limit", Limit)
|
.withQueryParam("limit", limit)
|
||||||
.withPathParam("permalink", Permalink)
|
.withPathParam("permalink", permalink)
|
||||||
.withHeaderParam("auth_token", AuthToken)
|
.withHeaderParam("auth_token", authToken)
|
||||||
.withSuccessResponse[Unit](200)
|
.withSuccessResponse[Unit](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
.withErrorResponse[Unit](403)
|
.withErrorResponse[Unit](403)
|
||||||
@ -134,15 +134,15 @@ object WordListApi {
|
|||||||
* code 403 : (Not Authorized to access WordList)
|
* code 403 : (Not Authorized to access WordList)
|
||||||
* code 404 : (WordList not found)
|
* code 404 : (WordList not found)
|
||||||
*
|
*
|
||||||
* @param Permalink permalink of WordList to user
|
* @param permalink permalink of WordList to user
|
||||||
* @param Body Array of words to add to WordList
|
* @param body Array of words to add to WordList
|
||||||
* @param AuthToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
* @param authToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
||||||
*/
|
*/
|
||||||
def addWordsToWordList(Permalink: String, Body: Seq[StringValue], AuthToken: String): ApiRequest[Unit] =
|
def addWordsToWordList(permalink: String, body: Seq[StringValue], authToken: String): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.POST, "https://api.wordnik.com/v4", "/wordList.json/{permalink}/words", "application/json")
|
ApiRequest[Unit](ApiMethods.POST, "https://api.wordnik.com/v4", "/wordList.json/{permalink}/words", "application/json")
|
||||||
.withBody(Body)
|
.withBody(body)
|
||||||
.withPathParam("permalink", Permalink)
|
.withPathParam("permalink", permalink)
|
||||||
.withHeaderParam("auth_token", AuthToken)
|
.withHeaderParam("auth_token", authToken)
|
||||||
.withSuccessResponse[Unit](200)
|
.withSuccessResponse[Unit](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
.withErrorResponse[Unit](403)
|
.withErrorResponse[Unit](403)
|
||||||
|
@ -16,13 +16,13 @@ object WordListsApi {
|
|||||||
* code 403 : (Not authenticated)
|
* code 403 : (Not authenticated)
|
||||||
* code 404 : (WordList owner not found)
|
* code 404 : (WordList owner not found)
|
||||||
*
|
*
|
||||||
* @param Body WordList to create
|
* @param body WordList to create
|
||||||
* @param AuthToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
* @param authToken The auth token of the logged-in user, obtained by calling /account.json/authenticate/{username} (described above)
|
||||||
*/
|
*/
|
||||||
def createWordList(Body: Option[WordList] = None, AuthToken: String): ApiRequest[WordList] =
|
def createWordList(body: Option[WordList] = None, authToken: String): ApiRequest[WordList] =
|
||||||
ApiRequest[WordList](ApiMethods.POST, "https://api.wordnik.com/v4", "/wordLists.json", "application/json")
|
ApiRequest[WordList](ApiMethods.POST, "https://api.wordnik.com/v4", "/wordLists.json", "application/json")
|
||||||
.withBody(Body)
|
.withBody(body)
|
||||||
.withHeaderParam("auth_token", AuthToken)
|
.withHeaderParam("auth_token", authToken)
|
||||||
.withSuccessResponse[WordList](200)
|
.withSuccessResponse[WordList](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
.withErrorResponse[Unit](403)
|
.withErrorResponse[Unit](403)
|
||||||
|
@ -17,27 +17,27 @@ object WordsApi {
|
|||||||
* code 200 : WordObject (success)
|
* code 200 : WordObject (success)
|
||||||
* code 404 : (No word found.)
|
* code 404 : (No word found.)
|
||||||
*
|
*
|
||||||
* @param HasDictionaryDef Only return words with dictionary definitions
|
* @param hasDictionaryDef Only return words with dictionary definitions
|
||||||
* @param IncludePartOfSpeech CSV part-of-speech values to include
|
* @param includePartOfSpeech CSV part-of-speech values to include
|
||||||
* @param ExcludePartOfSpeech CSV part-of-speech values to exclude
|
* @param excludePartOfSpeech CSV part-of-speech values to exclude
|
||||||
* @param MinCorpusCount Minimum corpus frequency for terms
|
* @param minCorpusCount Minimum corpus frequency for terms
|
||||||
* @param MaxCorpusCount Maximum corpus frequency for terms
|
* @param maxCorpusCount Maximum corpus frequency for terms
|
||||||
* @param MinDictionaryCount Minimum dictionary count
|
* @param minDictionaryCount Minimum dictionary count
|
||||||
* @param MaxDictionaryCount Maximum dictionary count
|
* @param maxDictionaryCount Maximum dictionary count
|
||||||
* @param MinLength Minimum word length
|
* @param minLength Minimum word length
|
||||||
* @param MaxLength Maximum word length
|
* @param maxLength Maximum word length
|
||||||
*/
|
*/
|
||||||
def getRandomWord(HasDictionaryDef: Option[String] = None, IncludePartOfSpeech: Option[String] = None, ExcludePartOfSpeech: Option[String] = None, MinCorpusCount: Option[Int] = None, MaxCorpusCount: Option[Int] = None, MinDictionaryCount: Option[Int] = None, MaxDictionaryCount: Option[Int] = None, MinLength: Option[Int] = None, MaxLength: Option[Int] = None): ApiRequest[WordObject] =
|
def getRandomWord(hasDictionaryDef: Option[String] = None, includePartOfSpeech: Option[String] = None, excludePartOfSpeech: Option[String] = None, minCorpusCount: Option[Int] = None, maxCorpusCount: Option[Int] = None, minDictionaryCount: Option[Int] = None, maxDictionaryCount: Option[Int] = None, minLength: Option[Int] = None, maxLength: Option[Int] = None): ApiRequest[WordObject] =
|
||||||
ApiRequest[WordObject](ApiMethods.GET, "https://api.wordnik.com/v4", "/words.json/randomWord", "application/json")
|
ApiRequest[WordObject](ApiMethods.GET, "https://api.wordnik.com/v4", "/words.json/randomWord", "application/json")
|
||||||
.withQueryParam("hasDictionaryDef", HasDictionaryDef)
|
.withQueryParam("hasDictionaryDef", hasDictionaryDef)
|
||||||
.withQueryParam("includePartOfSpeech", IncludePartOfSpeech)
|
.withQueryParam("includePartOfSpeech", includePartOfSpeech)
|
||||||
.withQueryParam("excludePartOfSpeech", ExcludePartOfSpeech)
|
.withQueryParam("excludePartOfSpeech", excludePartOfSpeech)
|
||||||
.withQueryParam("minCorpusCount", MinCorpusCount)
|
.withQueryParam("minCorpusCount", minCorpusCount)
|
||||||
.withQueryParam("maxCorpusCount", MaxCorpusCount)
|
.withQueryParam("maxCorpusCount", maxCorpusCount)
|
||||||
.withQueryParam("minDictionaryCount", MinDictionaryCount)
|
.withQueryParam("minDictionaryCount", minDictionaryCount)
|
||||||
.withQueryParam("maxDictionaryCount", MaxDictionaryCount)
|
.withQueryParam("maxDictionaryCount", maxDictionaryCount)
|
||||||
.withQueryParam("minLength", MinLength)
|
.withQueryParam("minLength", minLength)
|
||||||
.withQueryParam("maxLength", MaxLength)
|
.withQueryParam("maxLength", maxLength)
|
||||||
.withSuccessResponse[WordObject](200)
|
.withSuccessResponse[WordObject](200)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
|
|
||||||
@ -49,33 +49,33 @@ object WordsApi {
|
|||||||
* code 400 : (Invalid term supplied.)
|
* code 400 : (Invalid term supplied.)
|
||||||
* code 404 : (No results.)
|
* code 404 : (No results.)
|
||||||
*
|
*
|
||||||
* @param HasDictionaryDef Only return words with dictionary definitions
|
* @param hasDictionaryDef Only return words with dictionary definitions
|
||||||
* @param IncludePartOfSpeech CSV part-of-speech values to include
|
* @param includePartOfSpeech CSV part-of-speech values to include
|
||||||
* @param ExcludePartOfSpeech CSV part-of-speech values to exclude
|
* @param excludePartOfSpeech CSV part-of-speech values to exclude
|
||||||
* @param MinCorpusCount Minimum corpus frequency for terms
|
* @param minCorpusCount Minimum corpus frequency for terms
|
||||||
* @param MaxCorpusCount Maximum corpus frequency for terms
|
* @param maxCorpusCount Maximum corpus frequency for terms
|
||||||
* @param MinDictionaryCount Minimum dictionary count
|
* @param minDictionaryCount Minimum dictionary count
|
||||||
* @param MaxDictionaryCount Maximum dictionary count
|
* @param maxDictionaryCount Maximum dictionary count
|
||||||
* @param MinLength Minimum word length
|
* @param minLength Minimum word length
|
||||||
* @param MaxLength Maximum word length
|
* @param maxLength Maximum word length
|
||||||
* @param SortBy Attribute to sort by
|
* @param sortBy Attribute to sort by
|
||||||
* @param SortOrder Sort direction
|
* @param sortOrder Sort direction
|
||||||
* @param Limit Maximum number of results to return
|
* @param limit Maximum number of results to return
|
||||||
*/
|
*/
|
||||||
def getRandomWords(HasDictionaryDef: Option[String] = None, IncludePartOfSpeech: Option[String] = None, ExcludePartOfSpeech: Option[String] = None, MinCorpusCount: Option[Int] = None, MaxCorpusCount: Option[Int] = None, MinDictionaryCount: Option[Int] = None, MaxDictionaryCount: Option[Int] = None, MinLength: Option[Int] = None, MaxLength: Option[Int] = None, SortBy: Option[String] = None, SortOrder: Option[String] = None, Limit: Option[Int] = None): ApiRequest[Unit] =
|
def getRandomWords(hasDictionaryDef: Option[String] = None, includePartOfSpeech: Option[String] = None, excludePartOfSpeech: Option[String] = None, minCorpusCount: Option[Int] = None, maxCorpusCount: Option[Int] = None, minDictionaryCount: Option[Int] = None, maxDictionaryCount: Option[Int] = None, minLength: Option[Int] = None, maxLength: Option[Int] = None, sortBy: Option[String] = None, sortOrder: Option[String] = None, limit: Option[Int] = None): ApiRequest[Unit] =
|
||||||
ApiRequest[Unit](ApiMethods.GET, "https://api.wordnik.com/v4", "/words.json/randomWords", "application/json")
|
ApiRequest[Unit](ApiMethods.GET, "https://api.wordnik.com/v4", "/words.json/randomWords", "application/json")
|
||||||
.withQueryParam("hasDictionaryDef", HasDictionaryDef)
|
.withQueryParam("hasDictionaryDef", hasDictionaryDef)
|
||||||
.withQueryParam("includePartOfSpeech", IncludePartOfSpeech)
|
.withQueryParam("includePartOfSpeech", includePartOfSpeech)
|
||||||
.withQueryParam("excludePartOfSpeech", ExcludePartOfSpeech)
|
.withQueryParam("excludePartOfSpeech", excludePartOfSpeech)
|
||||||
.withQueryParam("minCorpusCount", MinCorpusCount)
|
.withQueryParam("minCorpusCount", minCorpusCount)
|
||||||
.withQueryParam("maxCorpusCount", MaxCorpusCount)
|
.withQueryParam("maxCorpusCount", maxCorpusCount)
|
||||||
.withQueryParam("minDictionaryCount", MinDictionaryCount)
|
.withQueryParam("minDictionaryCount", minDictionaryCount)
|
||||||
.withQueryParam("maxDictionaryCount", MaxDictionaryCount)
|
.withQueryParam("maxDictionaryCount", maxDictionaryCount)
|
||||||
.withQueryParam("minLength", MinLength)
|
.withQueryParam("minLength", minLength)
|
||||||
.withQueryParam("maxLength", MaxLength)
|
.withQueryParam("maxLength", maxLength)
|
||||||
.withQueryParam("sortBy", SortBy)
|
.withQueryParam("sortBy", sortBy)
|
||||||
.withQueryParam("sortOrder", SortOrder)
|
.withQueryParam("sortOrder", sortOrder)
|
||||||
.withQueryParam("limit", Limit)
|
.withQueryParam("limit", limit)
|
||||||
.withSuccessResponse[Unit](200)
|
.withSuccessResponse[Unit](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
.withErrorResponse[Unit](404)
|
.withErrorResponse[Unit](404)
|
||||||
@ -87,41 +87,41 @@ object WordsApi {
|
|||||||
* code 200 : DefinitionSearchResults (success)
|
* code 200 : DefinitionSearchResults (success)
|
||||||
* code 400 : (Invalid term supplied.)
|
* code 400 : (Invalid term supplied.)
|
||||||
*
|
*
|
||||||
* @param Query Search term
|
* @param query Search term
|
||||||
* @param FindSenseForWord Restricts words and finds closest sense
|
* @param findSenseForWord Restricts words and finds closest sense
|
||||||
* @param IncludeSourceDictionaries Only include these comma-delimited source dictionaries
|
* @param includeSourceDictionaries Only include these comma-delimited source dictionaries
|
||||||
* @param ExcludeSourceDictionaries Exclude these comma-delimited source dictionaries
|
* @param excludeSourceDictionaries Exclude these comma-delimited source dictionaries
|
||||||
* @param IncludePartOfSpeech Only include these comma-delimited parts of speech
|
* @param includePartOfSpeech Only include these comma-delimited parts of speech
|
||||||
* @param ExcludePartOfSpeech Exclude these comma-delimited parts of speech
|
* @param excludePartOfSpeech Exclude these comma-delimited parts of speech
|
||||||
* @param MinCorpusCount Minimum corpus frequency for terms
|
* @param minCorpusCount Minimum corpus frequency for terms
|
||||||
* @param MaxCorpusCount Maximum corpus frequency for terms
|
* @param maxCorpusCount Maximum corpus frequency for terms
|
||||||
* @param MinLength Minimum word length
|
* @param minLength Minimum word length
|
||||||
* @param MaxLength Maximum word length
|
* @param maxLength Maximum word length
|
||||||
* @param ExpandTerms Expand terms
|
* @param expandTerms Expand terms
|
||||||
* @param IncludeTags Return a closed set of XML tags in response
|
* @param includeTags Return a closed set of XML tags in response
|
||||||
* @param SortBy Attribute to sort by
|
* @param sortBy Attribute to sort by
|
||||||
* @param SortOrder Sort direction
|
* @param sortOrder Sort direction
|
||||||
* @param Skip Results to skip
|
* @param skip Results to skip
|
||||||
* @param Limit Maximum number of results to return
|
* @param limit Maximum number of results to return
|
||||||
*/
|
*/
|
||||||
def reverseDictionary(Query: String, FindSenseForWord: Option[String] = None, IncludeSourceDictionaries: Option[String] = None, ExcludeSourceDictionaries: Option[String] = None, IncludePartOfSpeech: Option[String] = None, ExcludePartOfSpeech: Option[String] = None, MinCorpusCount: Option[Int] = None, MaxCorpusCount: Option[Int] = None, MinLength: Option[Int] = None, MaxLength: Option[Int] = None, ExpandTerms: Option[String] = None, IncludeTags: Option[String] = None, SortBy: Option[String] = None, SortOrder: Option[String] = None, Skip: Option[String] = None, Limit: Option[Int] = None): ApiRequest[DefinitionSearchResults] =
|
def reverseDictionary(query: String, findSenseForWord: Option[String] = None, includeSourceDictionaries: Option[String] = None, excludeSourceDictionaries: Option[String] = None, includePartOfSpeech: Option[String] = None, excludePartOfSpeech: Option[String] = None, minCorpusCount: Option[Int] = None, maxCorpusCount: Option[Int] = None, minLength: Option[Int] = None, maxLength: Option[Int] = None, expandTerms: Option[String] = None, includeTags: Option[String] = None, sortBy: Option[String] = None, sortOrder: Option[String] = None, skip: Option[String] = None, limit: Option[Int] = None): ApiRequest[DefinitionSearchResults] =
|
||||||
ApiRequest[DefinitionSearchResults](ApiMethods.GET, "https://api.wordnik.com/v4", "/words.json/reverseDictionary", "application/json")
|
ApiRequest[DefinitionSearchResults](ApiMethods.GET, "https://api.wordnik.com/v4", "/words.json/reverseDictionary", "application/json")
|
||||||
.withQueryParam("query", Query)
|
.withQueryParam("query", query)
|
||||||
.withQueryParam("findSenseForWord", FindSenseForWord)
|
.withQueryParam("findSenseForWord", findSenseForWord)
|
||||||
.withQueryParam("includeSourceDictionaries", IncludeSourceDictionaries)
|
.withQueryParam("includeSourceDictionaries", includeSourceDictionaries)
|
||||||
.withQueryParam("excludeSourceDictionaries", ExcludeSourceDictionaries)
|
.withQueryParam("excludeSourceDictionaries", excludeSourceDictionaries)
|
||||||
.withQueryParam("includePartOfSpeech", IncludePartOfSpeech)
|
.withQueryParam("includePartOfSpeech", includePartOfSpeech)
|
||||||
.withQueryParam("excludePartOfSpeech", ExcludePartOfSpeech)
|
.withQueryParam("excludePartOfSpeech", excludePartOfSpeech)
|
||||||
.withQueryParam("minCorpusCount", MinCorpusCount)
|
.withQueryParam("minCorpusCount", minCorpusCount)
|
||||||
.withQueryParam("maxCorpusCount", MaxCorpusCount)
|
.withQueryParam("maxCorpusCount", maxCorpusCount)
|
||||||
.withQueryParam("minLength", MinLength)
|
.withQueryParam("minLength", minLength)
|
||||||
.withQueryParam("maxLength", MaxLength)
|
.withQueryParam("maxLength", maxLength)
|
||||||
.withQueryParam("expandTerms", ExpandTerms)
|
.withQueryParam("expandTerms", expandTerms)
|
||||||
.withQueryParam("includeTags", IncludeTags)
|
.withQueryParam("includeTags", includeTags)
|
||||||
.withQueryParam("sortBy", SortBy)
|
.withQueryParam("sortBy", sortBy)
|
||||||
.withQueryParam("sortOrder", SortOrder)
|
.withQueryParam("sortOrder", sortOrder)
|
||||||
.withQueryParam("skip", Skip)
|
.withQueryParam("skip", skip)
|
||||||
.withQueryParam("limit", Limit)
|
.withQueryParam("limit", limit)
|
||||||
.withSuccessResponse[DefinitionSearchResults](200)
|
.withSuccessResponse[DefinitionSearchResults](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -132,33 +132,33 @@ object WordsApi {
|
|||||||
* code 200 : WordSearchResults (success)
|
* code 200 : WordSearchResults (success)
|
||||||
* code 400 : (Invalid query supplied.)
|
* code 400 : (Invalid query supplied.)
|
||||||
*
|
*
|
||||||
* @param Query Search query
|
* @param query Search query
|
||||||
* @param CaseSensitive Search case sensitive
|
* @param caseSensitive Search case sensitive
|
||||||
* @param IncludePartOfSpeech Only include these comma-delimited parts of speech
|
* @param includePartOfSpeech Only include these comma-delimited parts of speech
|
||||||
* @param ExcludePartOfSpeech Exclude these comma-delimited parts of speech
|
* @param excludePartOfSpeech Exclude these comma-delimited parts of speech
|
||||||
* @param MinCorpusCount Minimum corpus frequency for terms
|
* @param minCorpusCount Minimum corpus frequency for terms
|
||||||
* @param MaxCorpusCount Maximum corpus frequency for terms
|
* @param maxCorpusCount Maximum corpus frequency for terms
|
||||||
* @param MinDictionaryCount Minimum number of dictionary entries for words returned
|
* @param minDictionaryCount Minimum number of dictionary entries for words returned
|
||||||
* @param MaxDictionaryCount Maximum dictionary definition count
|
* @param maxDictionaryCount Maximum dictionary definition count
|
||||||
* @param MinLength Minimum word length
|
* @param minLength Minimum word length
|
||||||
* @param MaxLength Maximum word length
|
* @param maxLength Maximum word length
|
||||||
* @param Skip Results to skip
|
* @param skip Results to skip
|
||||||
* @param Limit Maximum number of results to return
|
* @param limit Maximum number of results to return
|
||||||
*/
|
*/
|
||||||
def searchWords(Query: String, CaseSensitive: Option[String] = None, IncludePartOfSpeech: Option[String] = None, ExcludePartOfSpeech: Option[String] = None, MinCorpusCount: Option[Int] = None, MaxCorpusCount: Option[Int] = None, MinDictionaryCount: Option[Int] = None, MaxDictionaryCount: Option[Int] = None, MinLength: Option[Int] = None, MaxLength: Option[Int] = None, Skip: Option[Int] = None, Limit: Option[Int] = None): ApiRequest[WordSearchResults] =
|
def searchWords(query: String, caseSensitive: Option[String] = None, includePartOfSpeech: Option[String] = None, excludePartOfSpeech: Option[String] = None, minCorpusCount: Option[Int] = None, maxCorpusCount: Option[Int] = None, minDictionaryCount: Option[Int] = None, maxDictionaryCount: Option[Int] = None, minLength: Option[Int] = None, maxLength: Option[Int] = None, skip: Option[Int] = None, limit: Option[Int] = None): ApiRequest[WordSearchResults] =
|
||||||
ApiRequest[WordSearchResults](ApiMethods.GET, "https://api.wordnik.com/v4", "/words.json/search/{query}", "application/json")
|
ApiRequest[WordSearchResults](ApiMethods.GET, "https://api.wordnik.com/v4", "/words.json/search/{query}", "application/json")
|
||||||
.withQueryParam("caseSensitive", CaseSensitive)
|
.withQueryParam("caseSensitive", caseSensitive)
|
||||||
.withQueryParam("includePartOfSpeech", IncludePartOfSpeech)
|
.withQueryParam("includePartOfSpeech", includePartOfSpeech)
|
||||||
.withQueryParam("excludePartOfSpeech", ExcludePartOfSpeech)
|
.withQueryParam("excludePartOfSpeech", excludePartOfSpeech)
|
||||||
.withQueryParam("minCorpusCount", MinCorpusCount)
|
.withQueryParam("minCorpusCount", minCorpusCount)
|
||||||
.withQueryParam("maxCorpusCount", MaxCorpusCount)
|
.withQueryParam("maxCorpusCount", maxCorpusCount)
|
||||||
.withQueryParam("minDictionaryCount", MinDictionaryCount)
|
.withQueryParam("minDictionaryCount", minDictionaryCount)
|
||||||
.withQueryParam("maxDictionaryCount", MaxDictionaryCount)
|
.withQueryParam("maxDictionaryCount", maxDictionaryCount)
|
||||||
.withQueryParam("minLength", MinLength)
|
.withQueryParam("minLength", minLength)
|
||||||
.withQueryParam("maxLength", MaxLength)
|
.withQueryParam("maxLength", maxLength)
|
||||||
.withQueryParam("skip", Skip)
|
.withQueryParam("skip", skip)
|
||||||
.withQueryParam("limit", Limit)
|
.withQueryParam("limit", limit)
|
||||||
.withPathParam("query", Query)
|
.withPathParam("query", query)
|
||||||
.withSuccessResponse[WordSearchResults](200)
|
.withSuccessResponse[WordSearchResults](200)
|
||||||
.withErrorResponse[Unit](400)
|
.withErrorResponse[Unit](400)
|
||||||
|
|
||||||
@ -168,11 +168,11 @@ object WordsApi {
|
|||||||
* Expected answers:
|
* Expected answers:
|
||||||
* code 0 : WordOfTheDay (success)
|
* code 0 : WordOfTheDay (success)
|
||||||
*
|
*
|
||||||
* @param Date Fetches by date in yyyy-MM-dd
|
* @param date Fetches by date in yyyy-MM-dd
|
||||||
*/
|
*/
|
||||||
def getWordOfTheDay(Date: Option[String] = None): ApiRequest[WordOfTheDay] =
|
def getWordOfTheDay(date: Option[String] = None): ApiRequest[WordOfTheDay] =
|
||||||
ApiRequest[WordOfTheDay](ApiMethods.GET, "https://api.wordnik.com/v4", "/words.json/wordOfTheDay", "application/json")
|
ApiRequest[WordOfTheDay](ApiMethods.GET, "https://api.wordnik.com/v4", "/words.json/wordOfTheDay", "application/json")
|
||||||
.withQueryParam("date", Date)
|
.withQueryParam("date", date)
|
||||||
.withDefaultSuccessResponse[WordOfTheDay]
|
.withDefaultSuccessResponse[WordOfTheDay]
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,12 +5,12 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class ApiTokenStatus (
|
case class ApiTokenStatus (
|
||||||
Valid: Option[Boolean],
|
valid: Option[Boolean],
|
||||||
Token: Option[String],
|
token: Option[String],
|
||||||
ResetsInMillis: Option[Long],
|
resetsInMillis: Option[Long],
|
||||||
RemainingCalls: Option[Long],
|
remainingCalls: Option[Long],
|
||||||
ExpiresInMillis: Option[Long],
|
expiresInMillis: Option[Long],
|
||||||
TotalRequests: Option[Long])
|
totalRequests: Option[Long])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,20 +5,20 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class AudioFile (
|
case class AudioFile (
|
||||||
AttributionUrl: Option[String],
|
attributionUrl: Option[String],
|
||||||
CommentCount: Option[Int],
|
commentCount: Option[Int],
|
||||||
VoteCount: Option[Int],
|
voteCount: Option[Int],
|
||||||
FileUrl: Option[String],
|
fileUrl: Option[String],
|
||||||
AudioType: Option[String],
|
audioType: Option[String],
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
Duration: Option[Double],
|
duration: Option[Double],
|
||||||
AttributionText: Option[String],
|
attributionText: Option[String],
|
||||||
CreatedBy: Option[String],
|
createdBy: Option[String],
|
||||||
Description: Option[String],
|
description: Option[String],
|
||||||
CreatedAt: Option[DateTime],
|
createdAt: Option[DateTime],
|
||||||
VoteWeightedAverage: Option[Float],
|
voteWeightedAverage: Option[Float],
|
||||||
VoteAverage: Option[Float],
|
voteAverage: Option[Float],
|
||||||
Word: Option[String])
|
word: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class AudioType (
|
case class AudioType (
|
||||||
Id: Option[Int],
|
id: Option[Int],
|
||||||
Name: Option[String])
|
name: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class AuthenticationToken (
|
case class AuthenticationToken (
|
||||||
Token: Option[String],
|
token: Option[String],
|
||||||
UserId: Option[Long],
|
userId: Option[Long],
|
||||||
UserSignature: Option[String])
|
userSignature: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,11 +5,11 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Bigram (
|
case class Bigram (
|
||||||
Count: Option[Long],
|
count: Option[Long],
|
||||||
Gram2: Option[String],
|
gram2: Option[String],
|
||||||
Gram1: Option[String],
|
gram1: Option[String],
|
||||||
Wlmi: Option[Double],
|
wlmi: Option[Double],
|
||||||
Mi: Option[Double])
|
mi: Option[Double])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Category (
|
case class Category (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
Name: Option[String])
|
name: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Citation (
|
case class Citation (
|
||||||
Cite: Option[String],
|
cite: Option[String],
|
||||||
Source: Option[String])
|
source: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class ContentProvider (
|
case class ContentProvider (
|
||||||
Id: Option[Int],
|
id: Option[Int],
|
||||||
Name: Option[String])
|
name: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,22 +5,22 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Definition (
|
case class Definition (
|
||||||
ExtendedText: Option[String],
|
extendedText: Option[String],
|
||||||
Text: Option[String],
|
text: Option[String],
|
||||||
SourceDictionary: Option[String],
|
sourceDictionary: Option[String],
|
||||||
Citations: Option[Seq[Citation]],
|
citations: Option[Seq[Citation]],
|
||||||
Labels: Option[Seq[Label]],
|
labels: Option[Seq[Label]],
|
||||||
Score: Option[Float],
|
score: Option[Float],
|
||||||
ExampleUses: Option[Seq[ExampleUsage]],
|
exampleUses: Option[Seq[ExampleUsage]],
|
||||||
AttributionUrl: Option[String],
|
attributionUrl: Option[String],
|
||||||
SeqString: Option[String],
|
seqString: Option[String],
|
||||||
AttributionText: Option[String],
|
attributionText: Option[String],
|
||||||
RelatedWords: Option[Seq[Related]],
|
relatedWords: Option[Seq[Related]],
|
||||||
Sequence: Option[String],
|
sequence: Option[String],
|
||||||
Word: Option[String],
|
word: Option[String],
|
||||||
Notes: Option[Seq[Note]],
|
notes: Option[Seq[Note]],
|
||||||
TextProns: Option[Seq[TextPron]],
|
textProns: Option[Seq[TextPron]],
|
||||||
PartOfSpeech: Option[String])
|
partOfSpeech: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class DefinitionSearchResults (
|
case class DefinitionSearchResults (
|
||||||
Results: Option[Seq[Definition]],
|
results: Option[Seq[Definition]],
|
||||||
TotalResults: Option[Int])
|
totalResults: Option[Int])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,18 +5,18 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Example (
|
case class Example (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
ExampleId: Option[Long],
|
exampleId: Option[Long],
|
||||||
Title: Option[String],
|
title: Option[String],
|
||||||
Text: Option[String],
|
text: Option[String],
|
||||||
Score: Option[ScoredWord],
|
score: Option[ScoredWord],
|
||||||
Sentence: Option[Sentence],
|
sentence: Option[Sentence],
|
||||||
Word: Option[String],
|
word: Option[String],
|
||||||
Provider: Option[ContentProvider],
|
provider: Option[ContentProvider],
|
||||||
Year: Option[Int],
|
year: Option[Int],
|
||||||
Rating: Option[Float],
|
rating: Option[Float],
|
||||||
DocumentId: Option[Long],
|
documentId: Option[Long],
|
||||||
Url: Option[String])
|
url: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class ExampleSearchResults (
|
case class ExampleSearchResults (
|
||||||
Facets: Option[Seq[Facet]],
|
facets: Option[Seq[Facet]],
|
||||||
Examples: Option[Seq[Example]])
|
examples: Option[Seq[Example]])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class ExampleUsage (
|
case class ExampleUsage (
|
||||||
Text: Option[String])
|
text: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Facet (
|
case class Facet (
|
||||||
FacetValues: Option[Seq[FacetValue]],
|
facetValues: Option[Seq[FacetValue]],
|
||||||
Name: Option[String])
|
name: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class FacetValue (
|
case class FacetValue (
|
||||||
Count: Option[Long],
|
count: Option[Long],
|
||||||
Value: Option[String])
|
value: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Frequency (
|
case class Frequency (
|
||||||
Count: Option[Long],
|
count: Option[Long],
|
||||||
Year: Option[Int])
|
year: Option[Int])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,11 +5,11 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class FrequencySummary (
|
case class FrequencySummary (
|
||||||
UnknownYearCount: Option[Int],
|
unknownYearCount: Option[Int],
|
||||||
TotalCount: Option[Long],
|
totalCount: Option[Long],
|
||||||
FrequencyString: Option[String],
|
frequencyString: Option[String],
|
||||||
Word: Option[String],
|
word: Option[String],
|
||||||
Frequency: Option[Seq[Frequency]])
|
frequency: Option[Seq[Frequency]])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Label (
|
case class Label (
|
||||||
Text: Option[String],
|
text: Option[String],
|
||||||
Type: Option[String])
|
`type`: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Note (
|
case class Note (
|
||||||
NoteType: Option[String],
|
noteType: Option[String],
|
||||||
AppliesTo: Option[Seq[String]],
|
appliesTo: Option[Seq[String]],
|
||||||
Value: Option[String],
|
value: Option[String],
|
||||||
Pos: Option[Int])
|
pos: Option[Int])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class PartOfSpeech (
|
case class PartOfSpeech (
|
||||||
Roots: Option[Seq[Root]],
|
roots: Option[Seq[Root]],
|
||||||
StorageAbbr: Option[Seq[String]],
|
storageAbbr: Option[Seq[String]],
|
||||||
AllCategories: Option[Seq[Category]])
|
allCategories: Option[Seq[Category]])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,13 +5,13 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Related (
|
case class Related (
|
||||||
Label1: Option[String],
|
label1: Option[String],
|
||||||
RelationshipType: Option[String],
|
relationshipType: Option[String],
|
||||||
Label2: Option[String],
|
label2: Option[String],
|
||||||
Label3: Option[String],
|
label3: Option[String],
|
||||||
Words: Option[Seq[String]],
|
words: Option[Seq[String]],
|
||||||
Gram: Option[String],
|
gram: Option[String],
|
||||||
Label4: Option[String])
|
label4: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Root (
|
case class Root (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
Name: Option[String],
|
name: Option[String],
|
||||||
Categories: Option[Seq[Category]])
|
categories: Option[Seq[Category]])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,17 +5,17 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class ScoredWord (
|
case class ScoredWord (
|
||||||
Position: Option[Int],
|
position: Option[Int],
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
DocTermCount: Option[Int],
|
docTermCount: Option[Int],
|
||||||
Lemma: Option[String],
|
lemma: Option[String],
|
||||||
WordType: Option[String],
|
wordType: Option[String],
|
||||||
Score: Option[Float],
|
score: Option[Float],
|
||||||
SentenceId: Option[Long],
|
sentenceId: Option[Long],
|
||||||
Word: Option[String],
|
word: Option[String],
|
||||||
Stopword: Option[Boolean],
|
stopword: Option[Boolean],
|
||||||
BaseWordScore: Option[Double],
|
baseWordScore: Option[Double],
|
||||||
PartOfSpeech: Option[String])
|
partOfSpeech: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,12 +5,12 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Sentence (
|
case class Sentence (
|
||||||
HasScoredWords: Option[Boolean],
|
hasScoredWords: Option[Boolean],
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
ScoredWords: Option[Seq[ScoredWord]],
|
scoredWords: Option[Seq[ScoredWord]],
|
||||||
Display: Option[String],
|
display: Option[String],
|
||||||
Rating: Option[Int],
|
rating: Option[Int],
|
||||||
DocumentMetadataId: Option[Long])
|
documentMetadataId: Option[Long])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class SimpleDefinition (
|
case class SimpleDefinition (
|
||||||
Text: Option[String],
|
text: Option[String],
|
||||||
Source: Option[String],
|
source: Option[String],
|
||||||
Note: Option[String],
|
note: Option[String],
|
||||||
PartOfSpeech: Option[String])
|
partOfSpeech: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class SimpleExample (
|
case class SimpleExample (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
Title: Option[String],
|
title: Option[String],
|
||||||
Text: Option[String],
|
text: Option[String],
|
||||||
Url: Option[String])
|
url: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class StringValue (
|
case class StringValue (
|
||||||
Word: Option[String])
|
word: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class Syllable (
|
case class Syllable (
|
||||||
Text: Option[String],
|
text: Option[String],
|
||||||
Seq: Option[Int],
|
seq: Option[Int],
|
||||||
Type: Option[String])
|
`type`: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class TextPron (
|
case class TextPron (
|
||||||
Raw: Option[String],
|
raw: Option[String],
|
||||||
Seq: Option[Int],
|
seq: Option[Int],
|
||||||
RawType: Option[String])
|
rawType: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,14 +5,14 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class User (
|
case class User (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
Username: Option[String],
|
username: Option[String],
|
||||||
Email: Option[String],
|
email: Option[String],
|
||||||
Status: Option[Int],
|
status: Option[Int],
|
||||||
FaceBookId: Option[String],
|
faceBookId: Option[String],
|
||||||
UserName: Option[String],
|
userName: Option[String],
|
||||||
DisplayName: Option[String],
|
displayName: Option[String],
|
||||||
Password: Option[String])
|
password: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,17 +5,17 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class WordList (
|
case class WordList (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
Permalink: Option[String],
|
permalink: Option[String],
|
||||||
Name: Option[String],
|
name: Option[String],
|
||||||
CreatedAt: Option[DateTime],
|
createdAt: Option[DateTime],
|
||||||
UpdatedAt: Option[DateTime],
|
updatedAt: Option[DateTime],
|
||||||
LastActivityAt: Option[DateTime],
|
lastActivityAt: Option[DateTime],
|
||||||
Username: Option[String],
|
username: Option[String],
|
||||||
UserId: Option[Long],
|
userId: Option[Long],
|
||||||
Description: Option[String],
|
description: Option[String],
|
||||||
NumberWordsInList: Option[Long],
|
numberWordsInList: Option[Long],
|
||||||
Type: Option[String])
|
`type`: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,13 +5,13 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class WordListWord (
|
case class WordListWord (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
Word: Option[String],
|
word: Option[String],
|
||||||
Username: Option[String],
|
username: Option[String],
|
||||||
UserId: Option[Long],
|
userId: Option[Long],
|
||||||
CreatedAt: Option[DateTime],
|
createdAt: Option[DateTime],
|
||||||
NumberCommentsOnWord: Option[Long],
|
numberCommentsOnWord: Option[Long],
|
||||||
NumberLists: Option[Long])
|
numberLists: Option[Long])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,12 +5,12 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class WordObject (
|
case class WordObject (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
Word: Option[String],
|
word: Option[String],
|
||||||
OriginalWord: Option[String],
|
originalWord: Option[String],
|
||||||
Suggestions: Option[Seq[String]],
|
suggestions: Option[Seq[String]],
|
||||||
CanonicalForm: Option[String],
|
canonicalForm: Option[String],
|
||||||
Vulgar: Option[String])
|
vulgar: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,18 +5,18 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class WordOfTheDay (
|
case class WordOfTheDay (
|
||||||
Id: Option[Long],
|
id: Option[Long],
|
||||||
ParentId: Option[String],
|
parentId: Option[String],
|
||||||
Category: Option[String],
|
category: Option[String],
|
||||||
CreatedBy: Option[String],
|
createdBy: Option[String],
|
||||||
CreatedAt: Option[DateTime],
|
createdAt: Option[DateTime],
|
||||||
ContentProvider: Option[ContentProvider],
|
contentProvider: Option[ContentProvider],
|
||||||
HtmlExtra: Option[String],
|
htmlExtra: Option[String],
|
||||||
Word: Option[String],
|
word: Option[String],
|
||||||
Definitions: Option[Seq[SimpleDefinition]],
|
definitions: Option[Seq[SimpleDefinition]],
|
||||||
Examples: Option[Seq[SimpleExample]],
|
examples: Option[Seq[SimpleExample]],
|
||||||
Note: Option[String],
|
note: Option[String],
|
||||||
PublishDate: Option[DateTime])
|
publishDate: Option[DateTime])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class WordSearchResult (
|
case class WordSearchResult (
|
||||||
Count: Option[Long],
|
count: Option[Long],
|
||||||
Lexicality: Option[Double],
|
lexicality: Option[Double],
|
||||||
Word: Option[String])
|
word: Option[String])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ import org.joda.time.DateTime
|
|||||||
|
|
||||||
|
|
||||||
case class WordSearchResults (
|
case class WordSearchResults (
|
||||||
SearchResults: Option[Seq[WordSearchResult]],
|
searchResults: Option[Seq[WordSearchResult]],
|
||||||
TotalResults: Option[Int])
|
totalResults: Option[Int])
|
||||||
extends ApiModel
|
extends ApiModel
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user