{"id":16102130,"url":"https://github.com/singingbush/dubclient","last_synced_at":"2026-01-15T22:25:20.415Z","repository":{"id":32659799,"uuid":"137647564","full_name":"SingingBush/dubclient","owner":"SingingBush","description":"Conveniently call the REST API on code.dlang.org and other DUB repositories","archived":false,"fork":false,"pushed_at":"2025-02-26T08:31:23.000Z","size":133,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-26T09:30:36.728Z","etag":null,"topics":["dub","java"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SingingBush.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-17T10:45:44.000Z","updated_at":"2025-02-26T08:27:16.000Z","dependencies_parsed_at":"2023-11-16T16:04:04.376Z","dependency_job_id":"8187dcb8-3c15-4f94-910e-7dace368d598","html_url":"https://github.com/SingingBush/dubclient","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SingingBush%2Fdubclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SingingBush%2Fdubclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SingingBush%2Fdubclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SingingBush%2Fdubclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SingingBush","download_url":"https://codeload.github.com/SingingBush/dubclient/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246793810,"owners_count":20834931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dub","java"],"created_at":"2024-10-09T18:52:21.520Z","updated_at":"2026-01-15T22:25:20.410Z","avatar_url":"https://github.com/SingingBush.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"DUB Client\n==========\n\n[![Java CI](https://github.com/SingingBush/dubclient/actions/workflows/maven.yml/badge.svg)](https://github.com/SingingBush/dubclient/actions/workflows/maven.yml)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.singingbush/dub-client/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.singingbush/dub-client)\n[![Javadocs](https://www.javadoc.io/badge/com.singingbush/dub-client.svg)](https://www.javadoc.io/doc/com.singingbush/dub-client)\n[![Coverage Status](https://coveralls.io/repos/github/SingingBush/dubclient/badge.svg?branch=main)](https://coveralls.io/github/SingingBush/dubclient?branch=main)\n\n[![SonarCloud](https://sonarcloud.io/api/project_badges/measure?project=dubclient\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=dubclient)\n\nStand-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.\n\n`https://code.dlang.org/api/packages/search?q=`\n\n`https://code.dlang.org/api/packages/{package}/info`\n\n`https://code.dlang.org/api/packages/{package}/{version}/info`\n\n`https://code.dlang.org/api/packages/{package}/stats`\n\n`https://code.dlang.org/api/packages/{package}/{version}/stats`\n\n`https://code.dlang.org/api/packages/{package}/latest`\n\n## Adding the dependency to your project\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.singingbush\u003c/groupId\u003e\n    \u003cartifactId\u003edub-client\u003c/artifactId\u003e\n    \u003cversion\u003e0.3.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Example usage\n\n```Java\nDubClient client = DubClient.builder()\n            //.withScheme(\"https\") optionally override to http is needed \n            //.withHostname(\"code.dlang.org\") optionally override if you host your own dub repo\n            //.withPort(443) optionally override if needed\n            .build();\n\nfinal PackageInfo info = client.packageInfo(\"vibe-d\"); // for info about a dub package\n\nfinal Stream\u003cSearchResult\u003e results = client.search(\"unit\"); // search dub repo\n\n// There are also functions for dealing with local dub files (dub.json or dub.sdl), such as:\n\nfinal DubProject project = client.parseProjectFile(Paths.get(\"dub.json\").toFile());\n```\n\n\nThe API for the dub registry can be found [here](https://github.com/dlang/dub-registry/blob/master/source/dubregistry/api.d):\n\n```D\ninterface IPackages {\n@safe:\n\n    @method(HTTPMethod.GET)\n    SearchResult[] search(string q = \"\");\n\n    @path(\":name/latest\")\n    string getLatestVersion(string _name);\n\n    @path(\":name/stats\")\n    DbPackageStats getStats(string _name);\n\n    @path(\":name/:version/stats\")\n    DownloadStats getStats(string _name, string _version);\n\n    @path(\":name/info\")\n    Json getInfo(string _name, bool minimize = false);\n\n    @path(\":name/:version/info\")\n    Json getInfo(string _name, string _version, bool minimize = false);\n\n    Json[string] getInfos(string[] packages, bool include_dependencies = false, bool minimize = false);\n}\n```\n\nThis package requires _Gson v2.13_, and uses _slf4j-api_ for logging. It's intended for use in the [Intellij-DUB](https://github.com/intellij-dlanguage/intellij-dub) plugin but may also be helpful to other projects.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingingbush%2Fdubclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsingingbush%2Fdubclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingingbush%2Fdubclient/lists"}