contentful-cma-parser


License

License

MIT
GroupId

GroupId

io.github.yannick-cw
ArtifactId

ArtifactId

contentful-cma-parser_2.12
Last Version

Last Version

0.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

contentful-cma-parser
contentful-cma-parser
Project Organization

Project Organization

io.github.yannick-cw
Source Code Management

Source Code Management

https://github.com/yannick-cw/contenful-scala/

Download contentful-cma-parser_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.yannick-cw/contentful-cma-parser_2.12/ -->
<dependency>
    <groupId>io.github.yannick-cw</groupId>
    <artifactId>contentful-cma-parser_2.12</artifactId>
    <version>0.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.yannick-cw/contentful-cma-parser_2.12/
implementation 'io.github.yannick-cw:contentful-cma-parser_2.12:0.0.4'
// https://jarcasting.com/artifacts/io.github.yannick-cw/contentful-cma-parser_2.12/
implementation ("io.github.yannick-cw:contentful-cma-parser_2.12:0.0.4")
'io.github.yannick-cw:contentful-cma-parser_2.12:jar:0.0.4'
<dependency org="io.github.yannick-cw" name="contentful-cma-parser_2.12" rev="0.0.4">
  <artifact name="contentful-cma-parser_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.yannick-cw', module='contentful-cma-parser_2.12', version='0.0.4')
)
libraryDependencies += "io.github.yannick-cw" % "contentful-cma-parser_2.12" % "0.0.4"
[io.github.yannick-cw/contentful-cma-parser_2.12 "0.0.4"]

Dependencies

compile (2)

Group / Artifact Type Version
com.chuusai : shapeless_2.12 jar 2.3.3
com.contentful.java : cma-sdk jar 3.2.4

test (1)

Group / Artifact Type Version
org.scalatest : scalatest_2.12 jar 3.0.5

Project Modules

There are no modules declared in this project.

contentful-scala

Generic CMAEntry reader

import com.contentful.java.cma.model.CMAEntry
import io.yannick_cw.contenful.parser.MetaInfo._
import io.yannick_cw.contenful.parser.syntax._
import io.yannick_cw.contenful.parser.auto._

case class Person(
  name: String,
  age: Int,
  more: Option[String],
  results: List[Int],
  // meta-info
  createdAt: CreatedAt,
  updatedAt: Option[UpdatedAt],
  firstPublishedAt: Option[FirstPublishedAt],
  publishedAt: Option[PublishedAt],
  status: Status
)

val entry: CmaEntry = ???
println(entry.as[Person])

Versions

Version
0.0.4
0.0.3
0.0.2
0.0.1