Domain classes and client for Prepr.io ('prepr')
This was created because POMS sychronizes data from Prepr for radio related data of the Dutch public broadcasters
Example code:
PreprRepositoryImpl impl = new PreprRepositoryImpl(
Prepr.
.builder()
.clientId("<your client id>")
.clientSecret("<your client secret>")
.build();
public void getSchedule() throws IOException, URISyntaxException {
log.info("schedule: {}",
impl.getTimelines().getSchedule(UUID.fromString("59ad94c1-7dec-4ea0-a9b4-b9eb4b6cfb16") // Channel.RAD5)
, LocalDate.of(2018, 5, 7), LocalDate.of(2018, 5, 8))
);
}
It is also possible to instantiate a bunch of repositories using spring
<bean class="nl.vpro.io.prepr.spring.SpringPreprRepositoriesConfiguration">
<constructor-arg value="media.properties" />
</bean>
This will create PreprRepositoryImpl
beans prepr.<channel>
, and also one instance of PreprRepositories
Something similar can also be accomplished without spring
nl.vpro.io.prepr.StandalonePreprRepositories.fromMap()
(note that @CacheResult
is not working then.)