Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.2 KB

README.md

File metadata and controls

47 lines (30 loc) · 1.2 KB

OSV4J

Maven Central javadoc

A java library for the OSV API.

Installation

implementation("io.github.primelib:osv4j:<latestVersion>")

Click to view instructions for other build tools.

Usage

Consumer Specification Approach

OSVConsumerApi client = OSVFactory.create(spec -> {
    spec.api(OSVConsumerApi.class);
});

client.getVulnById(spec -> spec.id("GHSA-jfh8-c2jp-5v3q"));

Parameter Approach

OSVApi client = OSVFactory.create(spec -> {
    spec.api(OSVApi.class);
});

client.getVulnById("GHSA-jfh8-c2jp-5v3q");

NOTE: The Parameter Approach can break if the API changes. The Consumer Specification Approach is more resilient to API changes.

Links

License

Released under the MIT License.