Skip to content

Commit

Permalink
Merge pull request #306 from guardian/bump-capi-client
Browse files Browse the repository at this point in the history
Bump CAPI scala client
  • Loading branch information
davidfurey authored Feb 23, 2024
2 parents 53947b6 + 18fa7cf commit 5fb4f4e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions fapi-client/src/test/resources/branding/FoundationTag.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"activeSponsorships": [
{
"sponsorshipTypeName": "sponsored",
"sponsorshipPackageName": "default",
"sponsorName": "Fairtrade Foundation",
"sponsorLogo": "https://static.theguardian.com/commercial/sponsor/sustainable/series/spotlight-commodities/logo.png",
"sponsorLink": "http://www.fairtrade.org.uk/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"activeSponsorships": [
{
"sponsorshipTypeName": "sponsored",
"sponsorshipPackageName": "default",
"sponsorName": "Fairtrade Foundation",
"sponsorLogo": "https://static.theguardian.com/commercial/sponsor/sustainable/series/spotlight-commodities/logo.png",
"sponsorLink": "http://www.fairtrade.org.uk/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"activeSponsorships": [
{
"sponsorshipTypeName": "sponsored",
"sponsorshipPackageName": "default",
"sponsorName": "Fairtrade Foundation",
"sponsorLogo": "https://static.theguardian.com/commercial/sponsor/sustainable/series/spotlight-commodities/logo.png",
"sponsorLink": "http://www.fairtrade.org.uk/"
Expand Down
1 change: 1 addition & 0 deletions fapi-client/src/test/resources/branding/PaidTag.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"activeSponsorships": [
{
"sponsorshipTypeName": "paid-content",
"sponsorshipPackage": "default",
"sponsorName": "Las Vegas Tourism",
"sponsorLogo": "https://static.theguardian.com/commercial/sponsor/16/Mar/2017/8b15f5a5-7d9d-4c8f-ae1b-5ab72654fd15-LasVegas_4c_207_Red.png",
"sponsorLink": "http://viva.lasvegas.com",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"activeSponsorships": [
{
"sponsorshipTypeName": "sponsored",
"sponsorshipPackageName": "default",
"sponsorName": "Fairtrade Foundation",
"sponsorLogo": "https://static.theguardian.com/commercial/sponsor/sustainable/series/spotlight-commodities/logo.png",
"sponsorLink": "http://www.fairtrade.org.uk/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"activeSponsorships": [
{
"sponsorshipTypeName": "sponsored",
"sponsorshipPackageName": "default",
"sponsorName": "Fairtrade Foundation",
"sponsorLogo": "https://static.theguardian.com/commercial/sponsor/sustainable/series/spotlight-commodities/logo.png",
"sponsorLink": "http://www.fairtrade.org.uk/",
Expand Down
7 changes: 7 additions & 0 deletions fapi-client/src/test/scala/com/gu/facia/api/TestModel.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ object TestModel {
implicit object SponsorshipType extends HasName[SponsorshipType] {
def nameOf(t: SponsorshipType): String = t.name
}
implicit object SponsorshipPackage extends HasName[SponsorshipPackage] {
def nameOf(t: SponsorshipPackage): String = t.name
}
}

private def byName[A](otherName: String)(a: A)(implicit n: HasName[A]): Boolean =
Expand All @@ -52,6 +55,7 @@ object TestModel {

case class TestSponsorship(
sponsorshipTypeName: String,
sponsorshipPackageName: Option[String],
sponsorName: String,
sponsorLogo: String,
sponsorLink: String,
Expand All @@ -63,6 +67,8 @@ object TestModel {
) extends Sponsorship {
def sponsorshipType: SponsorshipType =
SponsorshipType.list.find(byName(sponsorshipTypeName)(_)).get
def sponsorshipPackage: Option[SponsorshipPackage] =
sponsorshipPackageName.flatMap(p => SponsorshipPackage.list.find(byName(p)(_)))
def validFrom = None
def validTo = None
}
Expand Down Expand Up @@ -205,6 +211,7 @@ object TestModel {
def pillarId: Option[String] = None
def pillarName: Option[String] = None
def aliasPaths: Option[Seq[AliasPath]] = None
def channels: Option[collection.Seq[ContentChannel]] = None
}
implicit val stubItemFormat: Reads[StubItem] = Json.reads[StubItem]

Expand Down
2 changes: 1 addition & 1 deletion project/dependencies.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sbt._

object Dependencies {
val capiVersion = "19.2.3"
val capiVersion = "21.0.0"

val awsSdk = "com.amazonaws" % "aws-java-sdk-s3" % "1.12.524"
val commonsIo = "org.apache.commons" % "commons-io" % "1.3.2"
Expand Down

0 comments on commit 5fb4f4e

Please sign in to comment.