GithubHelp home page GithubHelp logo

Result sorting about diun HOT 2 CLOSED

vl-bwalocha avatar vl-bwalocha commented on May 22, 2024
Result sorting

from diun.

Comments (2)

vl-bwalocha avatar vl-bwalocha commented on May 22, 2024 1

Thanks for the response and the API link.
I've checked the API v2 documentation and indeed the response is ordered lexically:
listing-image-tags
There is no documented way to specify the sort order.
They only support limiting the result tag list (pagination).

I agree, analyzing all tag would be very bad idea.
We should call for all tags until they publish rational API endpoint.

I really appreciate of your work @crazy-max, superior work!
Have a nice day!

from diun.

crazy-max avatar crazy-max commented on May 22, 2024

Hi @vl-bwalocha,

The results from (i.e. Static) provider are alphabetically sorted.

Actually tags are sorted as they arrive through the registry API. The underlying endpoint for Docker Hub to fetch tags for a repository is https://index.docker.io/v2/crazymax/cloudflared/tags/list. With this example the result is:

{
  "name": "crazymax/cloudflared",
  "tags": [
    "2019.10.1",
    "2019.10.2",
    "2019.10.4",
    "2019.11.0",
    "2019.11.2",
    "2019.11.3",
    "2019.12.0",
    "2019.9.0",
    "2019.9.1",
    "2019.9.2",
    "2020.2.0",
    "latest"
  ]
}

Then the order is reversed in Diun to have latest tags first but as you stipulated, the order is alphabetical through this endpoint.

What we can do here is analyze each tag to get his created date but it could be a cumbersome operation. Keep you in touch if I find something better.
In the meantime, grab all the tags ๐Ÿš€

from diun.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.