Another data/API question: is there some way to get recent releases?
@martinklepsch I think you can hit <https://clojars.org/api/artifacts/leiningen>
and take the first element of the array recent_versions
which has the most recent release. I think it handles snapshots but I am not sure.
Snapshot example : https://clojars.org/api/artifacts/ql
Ref : https://github.com/clojars/clojars-web/wiki/Data#endpoints
@xtreak29 thanks, I was more looking for a “global feed” if that makes sense?
kind of what is displayed on the front page
Okay, I don't think it's exposed as an API. It does a SQL query against SQLite and the result is rendered in the template. SQL query : https://github.com/clojars/clojars-web/blob/0a454d26440f33d49067f261d660de780c8f558a/resources/queries/sqlite-queryfile.sql#L159 Relevant function : https://github.com/clojars/clojars-web/blob/f3c88a24ba29c5610827b0a8a759e3b1342a27fa/src/clojars/db.clj#L105 Relevant template : https://github.com/clojars/clojars-web/blob/0a454d26440f33d49067f261d660de780c8f558a/src/clojars/web/dashboard.clj#L59
@tcrawley are you aware of any way users could get a “feed” of releases on clojars? If not I would be happy to work on it.
@martinklepsch We don’t have anything formal, but it may be possible to simulate that now with a date-based query against the search api. That may allow you to get everything released since a certain date. Not the same thing, but would that work for your needs?
Do you have an example of how such query would look? I randomly tried https://clojars.org/search?q=incanter%20at:[2018-04-01%20TO%202018-04-10]&format=json after looking at some code but not sure that’s what you mean? 😄
Yep, something like that. I’ve never used the date search. You may need to include the time info for dates to be processed properly, like: https://clojars.org/search?q=at:[2018-04-01T00:00:00Z%20TO%202018-04-10T00:00:00Z]&format=json. Though That is paged in batches of 24, and I don’t recall how to get the next page. It’s clear that I never use search :)
Ok, thanks for the pointer, will dig 🙂