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 API endpoint to list all tools #273

Merged
merged 2 commits into from
Jul 21, 2021

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Jun 18, 2021

I've created a CLI to access the API!

https://github.com/hugovk/norwegianblue

For example:

image

It would be useful to have an endpoint to list all the tool names, currently:

$ cat api/all-tools.json
["alpine","amazon-linux","android","bootstrap","centos","debian","django","dotnet","dotnetcore","dotnetfx","drupal","elasticsearch","elixir","fedora","filemaker","freebsd","go","godot","iphone","java","kindle","kubernetes","laravel","macos","magento","mariadb","mongodb","mssqlserver","mysql","nodejs","office","perl","php","pixel","postgresql","powershell","python","rabbitmq","rails","redis","rhel","ros","ruby","spring-framework","surface","symfony","ubuntu","wagtail","windows","windowsembedded","windowsserver"]

https://deploy-preview-273--endoflife-date.netlify.app/api/all-tools.json

Naming things is hard; I wasn't sure about the address api/all-tools.json.

What do you think?

Could also be worth thinking if the regular API should be something like /api/v1/tool/python/3.9.json and /api/v1/tool/python.json?

@captn3m0
Copy link
Member

API versioning is something worth considering once we finalize on the API specification. Right now, it is very ad-hoc (See the keys for iPhone) and the schema is varying between tools as a result. So perhaps once we have that finalized, we could switch to /v1/ (we could perhaps redirect /api/* -> /api/v1/* as well once we have that). Will create a separate discussion for that.

Calling everything tool is also something that I'm not very happy with (it is only used in code as a result, not on the frontend), but we haven't found a better word so far. Maybe /api/all.json instead, so we avoid that whole problem (for now).

@captn3m0
Copy link
Member

Also, love the CLI 💯, that's gonna be very helpful (especially as we finalize the API schema). Thoughts on moving it under the endoflife.date org as the "official" CLI?

@hugovk
Copy link
Member Author

hugovk commented Jun 21, 2021

API versioning is something worth considering once we finalize on the API specification. Right now, it is very ad-hoc (See the keys for iPhone) and the schema is varying between tools as a result. So perhaps once we have that finalized, we could switch to /v1/ (we could perhaps redirect /api/* -> /api/v1/* as well once we have that). Will create a separate discussion for that.

👍

Calling everything tool is also something that I'm not very happy with (it is only used in code as a result, not on the frontend), but we haven't found a better word so far. Maybe /api/all.json instead, so we avoid that whole problem (for now).

Sure, renamed! There was a suggestion in #90 for "maybe also one for ALL the tools at once", which would be more "all" than this PR's list.

@hugovk
Copy link
Member Author

hugovk commented Jun 21, 2021

Also, love the CLI 💯, that's gonna be very helpful (especially as we finalize the API schema). Thoughts on moving it under the endoflife.date org as the "official" CLI?

Would be happy to!

@captn3m0 captn3m0 self-assigned this Jun 28, 2021
@captn3m0
Copy link
Member

Will review this soon, I promise.

@captn3m0 captn3m0 mentioned this pull request Jul 15, 2021
@usta
Copy link
Member

usta commented Jul 18, 2021

@hugovk small suggestion :
add colorize into your install_requires and also make small changes to your src/norwegianblue/init.py :
change :

from termcolor import colored

to

from colorama import init
from termcolor import colored
init()

this will let color also works on windows systems
termcolor is really old module and doesnt support some systems so using colorama and termcolor together
will fix all problems.

@hugovk
Copy link
Member Author

hugovk commented Jul 18, 2021

Good idea! I created an issue in the repo as a reminder. hugovk/norwegianblue#8

@captn3m0 captn3m0 merged commit 43a6eed into endoflife-date:master Jul 21, 2021
@captn3m0
Copy link
Member

Thanks a lot, I'll file a new PR for the docs update.

@hugovk hugovk deleted the all-tools.json branch July 24, 2021 08:16
@marcwrobel marcwrobel added the api Changes that relates to API label Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Changes that relates to API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants