Skip to content

Commit

Permalink
Added another example.
Browse files Browse the repository at this point in the history
  • Loading branch information
mihxil committed Jun 4, 2024
1 parent 912353d commit a3a015d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ It is split up in several modules. These are the important ones:
The clients can be configured by code and/or a configuration file in `${user.home}/conf/apiclient.properties`.

[source,java]
.frontend api
----
NpoApiClients clients = NpoApiClients.configured(nl.vpro.util.Env.TEST).build();
NpoApiMediaUtil util = new NpoApiMediaUtil(clients);
Expand All @@ -79,6 +80,15 @@ The clients can be configured by code and/or a configuration file in `${user.hom
----

[source,java]
.backend api
----
try (var client = MediaRestClient.configured(Env.PROD).build()) {
MediaObject mediaObject = client.getMediaObject("WO_VPRO_025678");
log.info("{}", mediaObject);
}
----

There are also 'providers' available to configure them easily via spring XML's or for example XML's of magnolia CMS (which uses guice)

== Versions
Expand Down

0 comments on commit a3a015d

Please sign in to comment.