Package

io.finch

petstore

Permalink

package petstore

Visibility
  1. Public
  2. All

Type Members

  1. case class Category(id: Option[Long], name: String) extends Product with Serializable

    Permalink

    Represents a Category object for pets.

    Represents a Category object for pets. This is the type of animal a pet is.

    id

    The unique, autogenerated ID of this Category.

    name

    The name of this Category.

  2. trait ErrorHandling extends AnyRef

    Permalink

    Tells the API how to respond when certain exceptions are thrown.

  3. case class InvalidInput(message: String) extends PetstoreError with Product with Serializable

    Permalink

    Thrown when the object given is invalid (i.e.

    Thrown when the object given is invalid (i.e. A new User or Pet contains an ID)

    message

    An error message

  4. case class Inventory(available: Int, pending: Int, adopted: Int) extends Product with Serializable

    Permalink

    Represents the current state of the Petstore and how many pets are currently of which Status.

  5. case class MissingIdentifier(message: String) extends PetstoreError with Product with Serializable

    Permalink

    Thrown when the given object is missing a unique ID.

    Thrown when the given object is missing a unique ID.

    message

    An error message

  6. case class MissingPet(message: String) extends PetstoreError with Product with Serializable

    Permalink

    Thrown when a given Pet does not exist in the database.

    Thrown when a given Pet does not exist in the database.

    message

    An error message

  7. case class MissingUser(message: String) extends PetstoreError with Product with Serializable

    Permalink

    Thrown when the User given does not exist in the database.

    Thrown when the User given does not exist in the database.

    message

    An error message

  8. case class Order(id: Option[Long], petId: Option[Long], quantity: Option[Long], shipDate: Option[String], status: Option[OrderStatus], complete: Option[Boolean]) extends Product with Serializable

    Permalink

    Represents an order to the petstore.

    Represents an order to the petstore.

    id

    The unique, autogenerated ID of the order. The user should never give an ID during Order creation.

    petId

    The ID of the pet being ordered.

    quantity

    The number of pets being ordered.

    shipDate

    The date the order will be shipped by.

    status

    The status of the order.

    complete

    Whether the order has been fulfilled.

  9. case class OrderNotFound(message: String) extends PetstoreError with Product with Serializable

    Permalink

    Thrown when the given Order does not exist in the database.

    Thrown when the given Order does not exist in the database.

    message

    An error message

  10. sealed trait OrderStatus extends AnyRef

    Permalink

    Represents the status of a particular order for pets.

    Represents the status of a particular order for pets. Can be "placed," "approved," or "delivered."

  11. case class Pet(id: Option[Long], name: String, photoUrls: Seq[String], category: Option[Category], tags: Option[Seq[Tag]], status: Option[Status]) extends Product with Serializable

    Permalink

    Represents Pets in the Petstore.

    Represents Pets in the Petstore. Each Pet has a unique ID that should not be known by the user at the time of its creation.

    id

    The pet's auto-generated, unique ID.

    name

    (Required) The pet's name.

    photoUrls

    (Required) A sequence of URLs that lead to uploaded photos of the pet.

    category

    The type of pet (cat, dragon, fish, etc.)

    tags

    Tags that describe this pet.

    status

    (Available, Pending, or Adopted)

  12. class PetstoreApp extends AnyRef

    Permalink

    PetstoreApp runs the PetstoreAPI service.

    PetstoreApp runs the PetstoreAPI service. It is the hub where all the endpoints that give users access to API methods are connected to the service itself, which is launched on port :8080.

  13. class PetstoreDb extends AnyRef

    Permalink

    Provides a great majority of the service methods that allow Users to interact with the Pets in the store and to get information about them.

  14. sealed abstract class PetstoreError extends Exception

    Permalink

    The parent error from which most PetstoreAPI errors extend.

    The parent error from which most PetstoreAPI errors extend. Thrown whenever something in the api goes wrong.

  15. case class RedundantUsername(message: String) extends PetstoreError with Product with Serializable

    Permalink

    Thrown when a new User has the same username as an existing User.

    Thrown when a new User has the same username as an existing User. (Usernames must be unique.)

    message

    An error message

  16. sealed trait Status extends AnyRef

    Permalink

    Represents the general status of a Pet.

    Represents the general status of a Pet. This should either be Available, Pending, or Adopted.

  17. case class Tag(id: Option[Long], name: String) extends Product with Serializable

    Permalink

    Represents a Tag for pets.

    Represents a Tag for pets. Tags cannot be passed with user-made, IDs.

    id

    The unique, autogenerated ID of this Tag.

    name

    The name of this Tag.

  18. case class User(id: Option[Long], username: String, firstName: Option[String], lastName: Option[String], email: Option[String], password: String, phone: Option[String]) extends Product with Serializable

    Permalink

    Represents a User in the system, who can interact with the petstore and purchase available Pet objects.

    Represents a User in the system, who can interact with the petstore and purchase available Pet objects.

    id

    Unique, autogenerated ID of the User

    username

    (Required)

    password

    (Required)

Value Members

  1. object Adopted extends Status with Product with Serializable

    Permalink

    The status of a Pet when it has been adopted.

  2. object Approved extends OrderStatus with Product with Serializable

    Permalink

    The status of an order after it has been approved by the store.

  3. object Available extends Status with Product with Serializable

    Permalink

    The status of a Pet when it is available for adoption.

  4. object Category extends Serializable

    Permalink

    Provides encoding and decoding methods for Category objects.

  5. object Delivered extends OrderStatus with Product with Serializable

    Permalink

    The status of an order after it has been delivered and completed.

  6. object Inventory extends Serializable

    Permalink

    Provides a codec for encoding and decoding Inventory objects.

  7. object Order extends Serializable

    Permalink

    Provides a codec for encoding and decoding Order objects.

  8. object OrderStatus

    Permalink

    Provides encode and decode methods for OrderStatus objects.

    Provides encode and decode methods for OrderStatus objects. If asked to decode a string other than "placed," "approved," or "delivered" the system will fail.

  9. object Pending extends Status with Product with Serializable

    Permalink

    The status of a Pet when it is pending for adoption, and currently unavailable for purchase.

  10. object Pet extends Serializable

    Permalink

    Provides a codec for decoding and encoding Pet objects.

  11. object PetstoreApp extends PetstoreApp with App

    Permalink

    Launches the PetstoreAPI service when the system is ready.

  12. object Placed extends OrderStatus with Product with Serializable

    Permalink

    The status of an order after it has been placed.

  13. object Status

    Permalink

    Provides encoding and decoding methods for Status objects.

    Provides encoding and decoding methods for Status objects. When given a string other than "available," "pending," or "adopted," it fails to decode the string to a Status object.

  14. object Tag extends Serializable

    Permalink

    Represents a Tag object for pets.

  15. object User extends Serializable

    Permalink

    Companion object to the User class.

  16. object endpoint extends ErrorHandling

    Permalink

    Provides the paths and endpoints for all the API's public service methods.

  17. object reader

    Permalink

    Represents a reader object that helps extract parameters from query params and bodies.

Ungrouped