Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vpro/prepr

Domain classes and client for the radiomanager API 'prepr' https://developers.prepr.io/
https://github.com/vpro/prepr

graphlr mediaconnect npo poms prepr

Last synced: 28 days ago
JSON representation

Domain classes and client for the radiomanager API 'prepr' https://developers.prepr.io/

Awesome Lists containing this project

README

        

= prepr

Domain classes and client for https://prepr.io[Prepr.io] ('prepr')

https://prepr.dev[API Documentation for Prepr]

image:https://github.com/vpro/prepr/workflows/build/badge.svg?[Build Status,link=https://github.com/vpro/prepr/actions?query=workflow%3Abuild]
image:https://img.shields.io/maven-central/v/nl.vpro/prepr.svg?label=Maven%20Central[Maven Central,link=https://search.maven.org/search?q=g:%22nl.vpro%22%20AND%20a:%22prepr%22]
image:https://img.shields.io/nexus/s/https/oss.sonatype.org/nl.vpro/prepr.svg[snapshots,link=https://oss.sonatype.org/content/repositories/snapshots/nl/vpro/prepr/]
image:http://www.javadoc.io/badge/nl.vpro/prepr.svg?color=blue[javadoc,link=http://www.javadoc.io/doc/nl.vpro/prepr]
image:https://codecov.io/gh/vpro/prepr/branch/main/graph/badge.svg[codecov,link=https://codecov.io/gh/vpro/prepr]

This was created because https://rs.poms.omroep.nl/v1[POMS] sychronized (until april 2024) data from Prepr for radio related data of the Dutch public broadcasters. It doesn't do that anymore, so this project may be archived soon.

Example code:

[source,java]
----
PreprRepositoryImpl impl = new PreprRepositoryImpl(
Prepr.
.builder()
.clientId("")
.clientSecret("")
.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

[source,xml]
----



----

This will create `PreprRepositoryImpl` beans `prepr.<channel>`, and also one instance of `PreprRepositories`

Something similar can also be accomplished without spring

[source,java]
----
nl.vpro.io.prepr.StandalonePreprRepositories.fromMap()

----

(note that `@CacheResult` is not working then.)

== Testing

There are junit test in the normal spots. Some things are in '*ITest' classes. These are currently mainly used to try things out. They find credentials in `${USER.HOME}/conf/prepr.properties`. We don't have proper integration tests yet.