Fork me on GitHub

Can I access the documentation data behind cljdoc through an API somehow?


More precisely, looking for a way to get a seq of namespaces contained in an artefact (identified by a coordinate, leiningen or deps.edn)


@jaihindh.reddy for the purposes of documentation or otherwise?


uh @jaihindh.reddy I guess instead. There's two.


@jaihindhreddy there’s no API as such but if you tell us a bit more about what you’re trying to achieve maybe we can figure something out


Check this deps.edn out:

{:deps {clj-time {:mvn/version "0.15.1"}
        org.clojure/data.json {:mvn/version "0.2.6"}
        clj-http {:mvn/version "3.9.1"}
        org.clojure/test.check {:mvn/version "0.10.0-alpha4"}}}
I want to write a function that takes the above data structure, and returns this:
{[clj-time {:mvn/version "0.15.1"}] [clj-time.coerce clj-time.core clj-time.format clj-time.instant clj-time.internal.fn clj-time.jdbc clj-time.local clj-time.periodic clj-time.predicates clj-time.spec clj-time.types]
 [org.clojure/data.json {:mvn/version "0.2.6"}] []
 [clj-http {:mvn/version "3.9.1"}] [clj-http.client clj-http.conn-mgr clj-http.cookies clj-http.core clj-http.core-old clj-http.headers clj-http.links clj-http.multipart clj-http.util]
 [org.clojure/test.check {:mvn/version "0.10.0-alpha4"}] [clojure.test.check]}


so you want to provide a list of artifacts and get that list back with namespaces in those artifacts attached to each?


So there's no API as such currently. It wouldn't be too hard to build something but I'd kind of like to get it right instead of adding random API endpoints. Which reminds me of some previous discussions of adding a GraphQL API for the data on cljdoc.

👍 8