Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an endpoint for reverse searching projects based on jar files #1286

Open
TekExplorer opened this issue Nov 14, 2023 · 0 comments
Open

Add an endpoint for reverse searching projects based on jar files #1286

TekExplorer opened this issue Nov 14, 2023 · 0 comments
Labels
1. api This issue/pr relates to an issue/change on the api 1. feature New feature or request

Comments

@TekExplorer
Copy link

Is your feature request related to a problem?

Right now, there's no way to find a resource on hangar based on a jar file.

This can be useful for plugin managers that want to be able to "discover" manually added plugins, or simply dont want to have to track what plugins are installed in a separate, easily desynced, database.

Describe the solution you'd like.

All uploaded files already have sha256Hash keys, so maybe add an endpoint that allows reverse searching based on that
(it wont work for external jars, but since i cant exactly curl those i'll ignore it)

Modrinth has this in their api with getVersionFromHash and its multi-search siblings

Describe alternatives you've considered.

One alternative is to go the ore route and force all plugins to include the slug in their jar somewhere (in ore's case, the modid is the slug) but unfortunately, i think at this point Hangar has too many resources to feasibly do this retroactively without injecting the value into the jars... which could be viable.

alternatively, have the requirement from now on and simply dont present the un-tagged jars, or perhaps do the injection on those? maybe not automatically - perhaps as an option for authors to ensure full availability?

Other

As a side note, i think that external jars should simply be removed entirely.
I get it, but also why? As devs, being able to programmatically download stuff is basically half of what we do with apis!
Additionally, external downloads means that a resource could just.. stop existing and we wont be able to ever get those files again.
That actively goes against what a distribution platform should advocate.

Perhaps I should make an issue for that 🤔

@kennytv kennytv added 1. feature New feature or request 1. api This issue/pr relates to an issue/change on the api labels Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. api This issue/pr relates to an issue/change on the api 1. feature New feature or request
Projects
Status: New
Development

No branches or pull requests

2 participants