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 for features #2315

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

jamesnw
Copy link
Collaborator

@jamesnw jamesnw commented Nov 25, 2024

This adds a simple static api to the GitHub Pages site.

  • /api/v1/features.json returns a list of all keys.
  • /api/v1/features/[id].json returns a single feature (with the addition of the id).

We could easily add additional endpoints down the road.

While there is an API available at https://api.webstatus.dev/v1/features/[id], I think this has some benefits-

  • Anyone can (very) simply host their own version
  • The returned data is in the same format as the web-features data (the webstatus.dev API renames fields and changes the structure slightly)
  • We have better control over the update cadence

@tidoust says it better here- #204 (comment).

This does add a dependency from the gh-pages submodule on packages/web-features, and I think currently the API would get updated whenever the gh-pages repo is updated. We need to consider if the API should be updated with every update to main, or only on releases.

  • Document API
  • Configure API update cadence

@github-actions github-actions bot added the tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings label Nov 25, 2024
Copy link
Contributor

@captainbrosset captainbrosset left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it. 🛳️ it

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation tools and infrastructure Project internal tooling, such as linters, GitHub Actions, or repo settings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants