io

prismic

package prismic

Visibility
  1. Public
  2. All

Type Members

  1. final class Api extends AnyRef

    High-level entry point for communications with prismic.

    High-level entry point for communications with prismic.io API

  2. sealed trait ApiError extends RuntimeException

    Error thrown when communicating with prismic.

    Error thrown when communicating with prismic.io API

  3. case class AuthorizationNeeded(message: String, oAuthUrl: String) extends RuntimeException with ApiError with Product with Serializable

    Error thrown when the auth token is omitted, but required

  4. case class BuiltInCache(maxDocuments: Int = 100) extends Cache with Product with Serializable

    Default HTTP cache implementation, relying on apache in-memory LRUMap (recommended)

  5. trait Cache extends AnyRef

    Cache prismic.

    Cache prismic.io HTTP responses

  6. case class Document(id: String, typ: String, href: String, tags: Seq[String], slugs: Seq[String], linkedDocuments: List[LinkedDocument], fragments: Map[String, Fragment]) extends WithFragments with Product with Serializable

    A prismic.

    A prismic.io document

  7. trait DocumentLinkResolver extends AnyRef

    Builds URL specific to an application, based on a generic prismic.

    Builds URL specific to an application, based on a generic prismic.io document link.

  8. case class Experiment(id: String, googleId: Option[String], name: String, variations: Seq[Variation]) extends Product with Serializable

    Experiment exposed by prismic API

    Experiment exposed by prismic API

    id

    prismic experiment ID

    googleId

    Google experiment ID, empty if experiment is a draft

    name

    user set name

    variations

    list of variations for this experiment

  9. case class Experiments(draft: Seq[Experiment], running: Seq[Experiment]) extends Product with Serializable

    All experiments exposed by prismic API

    All experiments exposed by prismic API

    draft

    experiments in draft stage, i.e. not running, for preview purpose

    running

    experiments in running stage, that will be presented to users

  10. case class Field(type: String, multiple: Boolean, default: Option[String]) extends Product with Serializable

    A prismic.

    A prismic.io document field metadata

  11. case class Form(name: Option[String], method: String, rel: Option[String], enctype: String, action: String, fields: Map[String, Field]) extends Product with Serializable

  12. sealed trait Fragment extends AnyRef

  13. trait HtmlSerializer extends AnyRef

  14. case class InvalidToken(message: String, oAuthUrl: String) extends RuntimeException with ApiError with Product with Serializable

    Error thrown when the auth token is provided, but invalid

  15. case class LinkedDocument(id: String, slug: Option[String], typ: String, tags: Seq[String]) extends Product with Serializable

    A reference to an other Prismic document, used in "related documents"

    A reference to an other Prismic document, used in "related documents"

    id

    the Prismic identifier

    slug

    optional slug of the document

    typ

    document type

    tags

    list of tags of the document from Prismic

  16. sealed trait Predicate extends AnyRef

    A Prismic predicate.

    A Prismic predicate. Examples: Query.at("document.type", "article") Query.dateBefore("document.created", new DateTime().minusMonth(1))

    See the helpers in the companion object.

  17. trait QuerySerializer[T] extends AnyRef

  18. case class Ref(id: String, ref: String, label: String, isMasterRef: Boolean = false, scheduledAt: Option[DateTime] = None) extends Product with Serializable

    Represent a prismic.

    Represent a prismic.io reference, a fixed point in time.

    The references must be provided when accessing to any prismic.io resource (except /api) and allow to assert that the URL you use will always returns the same results.

  19. case class Response(results: List[Document], page: Int, resultsPerPage: Int, resultsSize: Int, totalResultsSize: Int, totalPages: Int, nextPage: Option[String], prevPage: Option[String]) extends Product with Serializable

    Paginated response to a Prismic.

    Paginated response to a Prismic.io query. Note that you may not get all documents in the first page, and may need to retrieve more pages or increase the page size.

  20. case class SearchForm(api: Api, form: Form, data: Map[String, Seq[String]]) extends Product with Serializable

    A SearchForm represent a Form returned by the prismic.

    A SearchForm represent a Form returned by the prismic.io API.

    These forms depend on the prismic.io repository, and can be filled and sent as regular HTML forms.

    You may get a SearchForm instance through the io.prismic.Api.forms method.

    The SearchForm instance contains helper methods for each predefined form's fields.

    Example:
    1. val form = api.forms('everything') .page(3) // specify the field 'page' .pageSize(20) // specify the 'page_size' field val results = form.submit() // submit the search form

  21. sealed trait State extends AnyRef

  22. case class UnexpectedError(message: String) extends RuntimeException with ApiError with Product with Serializable

    Error that should never happen

  23. case class Variation(id: String, ref: String, label: String) extends Product with Serializable

    Experiment variation exposed by prismic API

    Experiment variation exposed by prismic API

    id

    technical prismic ID

    ref

    queryable ref of the variation (similar to release ref)

    label

    user set label

Value Members

  1. object Api

    Instanciate an Api instance from a prismic.

    Instanciate an Api instance from a prismic.io API URL

  2. object Cache

  3. object DocumentLinkResolver

    DocumentLinkResolver builders

  4. object Experiment extends Serializable

  5. object Fragment

  6. object HtmlSerializer

  7. object Info

  8. object Month extends Enumeration

  9. object NoCache extends Cache

    Do NOT cache prismic.

    Do NOT cache prismic.io HTTP responses

  10. object Pending extends State with Product with Serializable

  11. object Predicate

  12. object QuerySerializer

  13. object WeekDay extends Enumeration

Ungrouped