facia-json


License

License

Categories

Categories

JSON Data
GroupId

GroupId

com.gu
ArtifactId

ArtifactId

facia-json_2.11
Last Version

Last Version

3.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

facia-json
facia-json
Project URL

Project URL

https://github.com/guardian/facia-scala-client
Project Organization

Project Organization

com.gu
Source Code Management

Source Code Management

https://github.com/guardian/facia-scala-client

Download facia-json_2.11

How to add to project

<!-- https://jarcasting.com/artifacts/com.gu/facia-json_2.11/ -->
<dependency>
    <groupId>com.gu</groupId>
    <artifactId>facia-json_2.11</artifactId>
    <version>3.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.gu/facia-json_2.11/
implementation 'com.gu:facia-json_2.11:3.0.4'
// https://jarcasting.com/artifacts/com.gu/facia-json_2.11/
implementation ("com.gu:facia-json_2.11:3.0.4")
'com.gu:facia-json_2.11:jar:3.0.4'
<dependency org="com.gu" name="facia-json_2.11" rev="3.0.4">
  <artifact name="facia-json_2.11" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.gu', module='facia-json_2.11', version='3.0.4')
)
libraryDependencies += "com.gu" % "facia-json_2.11" % "3.0.4"
[com.gu/facia-json_2.11 "3.0.4"]

Dependencies

compile (5)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.11.12
com.amazonaws : aws-java-sdk-s3 jar 1.11.154
org.apache.commons : commons-io jar 1.3.2
com.typesafe.play : play-json_2.11 jar 2.4.6
com.typesafe.scala-logging : scala-logging_2.11 jar 3.5.0

test (1)

Group / Artifact Type Version
org.specs2 : specs2-core_2.11 jar 4.0.0

Project Modules

There are no modules declared in this project.

Facia Scala Client Maven Central

Facia's Scala client is split into two parts.

The Fronts API client

The fapi-client project contains the main Fronts API client. This provides ways to fetch Fronts data and includes high-level logic to convert Facia's low-level internal data structures into more easily-used types.

Adding the dependency to SBT

Add the following line to your SBT build file:

libraryDependencies += "com.gu" %% "fapi-client-play26" % "3.0.2"

Using the library

To use the Fronts API client you will need instances of:

  • the content API client
  • the underlying Facia JSON library

These instances will need to be configured with your access/API keys. The FAPI class contains the public interface to the behaviour in the library. Examples of how to use the client can be found in the demo.sc file, an IntelliJ worksheet.

Low-level client for Facia JSON API.

The low-level Facia API client is designed to fetch and manipulate Facia's internal JSON structures. This library provides underlying behaviour for the main Fronts API client.

Adding the dependency to SBT

Add the following line to your SBT build file:

libraryDependencies += "com.gu" %% "facia-json-play26" % "3.0.2"

Making calls to the API

Config
ApiClient.config

Returns the current config.

Collection
ApiClient.collection("id goes here")

Returns the collection with the given ID.

Running the tests

To run the tests you need to pass a content api key and facia client target url to the library via your environment.

export CONTENT_API_KEY="<api-key>"
export FACIA_CLIENT_TARGET_URL="<target-url>"
sbt test

Before releasing a new version

Before releasing, consider whether your changes are likely to be backwards-compatible with older versions of the client -- for example, if the new version introduces new serialisations that old versions won't be able to read. Where possible, we should aim to maintain backwards compatibility.

At the time of writing, Tools, Dotcom, Mobile teams (Mapi) and Ophan all use facia-scala-client -- take care to understand who is using the library and communicate changes where appropriate.

Building a release

This document is a good source of information about releasing Guardian artefacts generally.

To release a new version of the client:

  1. Ensure you have a GPG key listed on a public key server.
  2. Ensure you are registered on Sonatype for Guardian projects.
  3. Open sbt and run the sbt release task:
$ sbt
sbt:facia-api-client> release
  1. When the release process has completed successfully, update the change log.
com.gu

The Guardian

The source code of the world's leading liberal voice

Versions

Version
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
2.6.8
2.6.7
2.6.6
2.6.5
2.6.4
2.6.3
2.6.2
2.6.1
2.6.0
2.5.4
2.5.3
2.5.2
2.5.1
2.5.0
2.4.1
2.4
2.3
2.2
2.1.3
2.1.2
2.1.1
2.1.0
2.0.17
2.0.16
2.0.15
2.0.14
2.0.13
2.0.12
2.0.11
2.0.10
2.0.9
2.0.8
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.6.2
1.6.1
1.6.0
1.5.3
1.5.2
1.5.1
1.5.0
1.4.0
1.3.0
1.2.0
1.1.0
1.0.0
0.70
0.69
0.68
0.67
0.66
0.64
0.63
0.62
0.61
0.60
0.59
0.58
0.57
0.56
0.55
0.54
0.53
0.52
0.51
0.50
0.49
0.48
0.47
0.46
0.45
0.44
0.43
0.42
0.41
0.40
0.39
0.38
0.37
0.36
0.35
0.34
0.33
0.32
0.31
0.30
0.29
0.28
0.27
0.25
0.24
0.23
0.22
0.21
0.20
0.19
0.18
0.17
0.16
0.15