DUB Client

Conveniently call the REST API on code.dlang.org and other DUB repositories

License

License

Categories

Categories

CLI User Interface
GroupId

GroupId

com.singingbush
ArtifactId

ArtifactId

dub-client
Last Version

Last Version

0.2.3
Release Date

Release Date

Type

Type

jar
Description

Description

DUB Client
Conveniently call the REST API on code.dlang.org and other DUB repositories
Project URL

Project URL

https://github.com/SingingBush/dubclient
Source Code Management

Source Code Management

https://github.com/SingingBush/dubclient/tree/master

Download dub-client

How to add to project

<!-- https://jarcasting.com/artifacts/com.singingbush/dub-client/ -->
<dependency>
    <groupId>com.singingbush</groupId>
    <artifactId>dub-client</artifactId>
    <version>0.2.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.singingbush/dub-client/
implementation 'com.singingbush:dub-client:0.2.3'
// https://jarcasting.com/artifacts/com.singingbush/dub-client/
implementation ("com.singingbush:dub-client:0.2.3")
'com.singingbush:dub-client:jar:0.2.3'
<dependency org="com.singingbush" name="dub-client" rev="0.2.3">
  <artifact name="dub-client" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.singingbush', module='dub-client', version='0.2.3')
)
libraryDependencies += "com.singingbush" % "dub-client" % "0.2.3"
[com.singingbush/dub-client "0.2.3"]

Dependencies

compile (4)

Group / Artifact Type Version
org.jetbrains : annotations jar 20.1.0
org.apache.httpcomponents : httpclient jar 4.5.10
com.google.code.gson : gson jar 2.8.6
org.slf4j : slf4j-api jar 1.7.29

test (3)

Group / Artifact Type Version
org.slf4j : slf4j-simple jar 1.7.29
org.junit.jupiter : junit-jupiter-engine jar 5.7.1
org.mockito : mockito-core jar 3.1.0

Project Modules

There are no modules declared in this project.

DUB Client

Java CI Build Status Maven Central Javadocs Coverage Status

Stand-alone library to provide convenient access to the REST API of a dub repository. Deserializes the json from the API for convenient use within a JVM language such as Java or Kotlin.

https://code.dlang.org/api/packages/search?q=

https://code.dlang.org/api/packages/{package}/info

https://code.dlang.org/api/packages/{package}/{version}/info

https://code.dlang.org/api/packages/{package}/stats

https://code.dlang.org/api/packages/{package}/{version}/stats

https://code.dlang.org/api/packages/{package}/latest

The API for the dub registry can be found here:

interface IPackages {
@safe:

	@method(HTTPMethod.GET)
	SearchResult[] search(string q = "");

	@path(":name/latest")
	string getLatestVersion(string _name);

	@path(":name/stats")
	DbPackageStats getStats(string _name);

	@path(":name/:version/stats")
	DownloadStats getStats(string _name, string _version);

	@path(":name/info")
	Json getInfo(string _name);

	@path(":name/:version/info")
	Json getInfo(string _name, string _version);
}

This package requires Apache HTTP Client v4.5.*, Gson v2.8, and uses slf4j-api for logging. It's intended for use in the Intellij-DUB plugin but may also be helpful to other projects.

Versions

Version
0.2.3
0.2.1
0.1.0