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

Improving /specifications #92

Closed
plehegar opened this issue Jun 18, 2019 · 1 comment
Closed

Improving /specifications #92

plehegar opened this issue Jun 18, 2019 · 1 comment

Comments

@plehegar
Copy link
Member

For all specifications, I find myself systematically accessing the latest-version/status in order to:

  1. eliminate retired specifications from the lists
  2. display the status of a specification

This generates a lot of subsequent API calls.

is it possible to expose specification/latest-version/status directly as specification/status, and have a way to only retrieve active specifications?

@vivienlacourba
Copy link
Member

Hi @plehegar,

You can get this info using a single API call (modulo the pagination for long results) from:
https://api.w3.org/specifications?embed=1

From that list you will have the status of the latest version of each specification (each specification status can be seen in the title attribute of the latest-version link ).

Below an extract from the above API call result showing one specification (ATAG10) with the Recommendation status and one (becss) with the Retired status.

{
  "page": 1,
  "limit": 100,
  "pages": 14,
  "total": 1326,
  (...)
  "_embedded": {
    "specifications": [
      {
        "shortlink": "http://www.w3.org/TR/ATAG10/",
        "title": "Authoring Tool Accessibility Guidelines 1.0",
        "shortname": "ATAG10",
        (...)
        "_links": {
          (...)
          "latest-version": {
            "href": "https://api.w3.org/specifications/ATAG10/versions/20000203",
            "title": "Recommendation"
          }
        }
      },
      (...)
      {
        "shortlink": "http://www.w3.org/TR/becss/",
        "title": "Behavioral Extensions to CSS",
        "shortname": "becss",
        (...)
        "_links": {
          (...)
          "latest-version": {
            "href": "https://api.w3.org/specifications/becss/versions/20141014",
            "title": "Retired"
          }
        }
      },
      (...)
    ]
  }
}

For all specifications, I find myself systematically accessing the latest-version/status in order to:

  1. eliminate retired specifications from the lists

Unfortunately with the current W3C API code it is not possible to filter on the server side the results to omit the specifications with a Retired status (see #76).

@w3c w3c deleted a comment from Thedoctor1989 Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants