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

REST API #4

Open
edqx opened this issue Aug 19, 2024 · 1 comment
Open

REST API #4

edqx opened this issue Aug 19, 2024 · 1 comment

Comments

@edqx
Copy link

edqx commented Aug 19, 2024

It would be quite helpful to many people to make use of a public REST API for Ziglist, so that people can make their own applications that make use of the knowledge available. For example, someone's package manager CLI could make use of the directory, or someone could make a CLI for Ziglist, or a discord bot, etc.

Here's some example endpoints I had in mind:

# get basic statistics about the repository, i.e. package counts
GET /

# get front-page packages
GET /packages?sort=active
GET /packages?sort=new
GET /packages?sort=top

# get package dependencies
GET /deps

# search packages
GET /packages?q=http
GET /packages?q=websocket

# get a specific package by its 'name' on ziglist
GET /packages/karlseguin/http.zig
@edqx edqx changed the title Rest API REST API Aug 19, 2024
@pixqc
Copy link
Owner

pixqc commented Aug 20, 2024

Unless there's strong demands, I don't think an API makes sense.

If people want the data Ziglist has, they can:

I think these three solutions work fine for most cases without the overhead of designing+maintaining API endpoints.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants