Project

w3c_api

0.0
The project is in a healthy, maintained state
A Ruby wrapper for the W3C web API with a CLI interface
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

W3C API through LutaML Models

Gem Version Build Status Code Climate

Purpose

A Ruby client implementation for the W3C web API with a CLI interface.

This gem provides:

  • A complete client for the W3C API (oft-used endpoints implemented)

  • Data models created with lutaml-hal and lutaml-model for all W3C API resources

  • HAL (Hypertext Application Language) implementation for recursive resource traversal

  • A command-line interface using Thor following GitHub CLI patterns

The endpoint supported is at https://api.w3.org.

This gem is developed against the W3C API documented at https://api.w3.org/doc.

Illustrative example usage

This is an example demonstrating the power of this library as inherited from lutaml-hal, showing multiple levels of automatic link resolution.

Calling the Ruby API with multiple levels of link resolution
> require 'w3c_api'
> W3cApi::Hal.instance.register.fetch(:ecosystem_index)
  .links.ecosystems.first.realize
  .links.evangelists.realize

# =>
#  #<W3cApi::Models::EvangelistIndex:0x000000011de99d50
#   @limit=100,
#   @links=
#    #<W3cApi::Models::EvangelistIndexLinkSet:0x000000011c19a600
#     @evangelists=
#      [#<W3cApi::Models::UserLink:0x000000011c1b9f78
#        @deprecation=nil,
#        @href="https://api.w3.org/users/664293jn3jswwo4sccsoko0wwk0wog0",
#        @lang=nil,
#        @name=nil,
#        @profile=nil,
#        @templated=nil,
#        @title="Marty Voshell",
#        @type="User">],
#     @first=
#      #<W3cApi::Models::EvangelistIndexLink:0x000000010c7378c0
#       @deprecation=nil,
#       @href="https://api.w3.org/ecosystems/advertising/evangelists?page=1&items=100",
#       @lang=nil,
#       @name=nil,
#       @profile=nil,
#       @templated=nil,
#       @title=nil,
#       @type="EvangelistIndex">,
#     @last=
#      #<W3cApi::Models::EvangelistIndexLink:0x000000010adeb560
#       @deprecation=nil,
#       @href="https://api.w3.org/ecosystems/advertising/evangelists?page=1&items=100",
#       @lang=nil,
#       @name=nil,
#       @profile=nil,
#       @templated=nil,
#       @title=nil,
#       @type="EvangelistIndex">,
#     @next=nil,
#     @prev=nil,
#     @self=
#      #<W3cApi::Models::EvangelistIndexLink:0x000000010c75a8c0
#       @deprecation=nil,
#       @href="https://api.w3.org/ecosystems/advertising/evangelists?page=1&items=100",
#       @lang=nil,
#       @name=nil,
#       @profile=nil,
#       @templated=nil,
#       @title=nil,
#       @type="EvangelistIndex">,
#     @up=
#      #<W3cApi::Models::EvangelistIndexLink:0x000000011c1be398
#       @deprecation=nil,
#       @href="https://api.w3.org/ecosystems/advertising",
#       @lang=nil,
#       @name=nil,
#       @profile=nil,
#       @templated=nil,
#       @title=nil,
#       @type="EvangelistIndex">>,
#   @page=1,
#   @pages=1,
#   @total=1>

Ruby API

General

require 'w3c_api'

# Create a client
client = W3cApi::Client.new

# Get specifications
specifications = client.specifications
specification = client.specification('webrtc')

versions = client.specification_versions('webrtc')
version = client.specification_version('webrtc', '20241008')
specs_by_status = client.specifications_by_status('Recommendation')

# Work with linked resources directly
spec = client.specification('webrtc')
spec_versions = spec.links.versions
latest = spec.links.latest_version.realize # Resolves the latest-version link
series = spec.links.series
editors = spec.links.editors
deliverers = spec.links.deliverers

# Get groups
groups = client.groups
group = client.group(109735)  # Immersive Web Working Group
users = client.group_users(109735)
specifications = client.group_specifications(109735)
charters = client.group_charters(109735)
chairs = client.group_chairs(109735)
team_contacts = client.group_team_contacts(109735)

# Use link resolution with groups
group = client.group(109735)
specs = group.links.specifications
users = group.links.users
chairs = group.links.chairs
charters = group.links.charters

# Get users
users = client.users
user = client.user('f1ovb5rydm8s0go04oco0cgk0sow44w')
groups = client.user_groups('f1ovb5rydm8s0go04oco0cgk0sow44w')
specs = client.user_specifications('f1ovb5rydm8s0go04oco0cgk0sow44w')
affiliations = client.user_affiliations('f1ovb5rydm8s0go04oco0cgk0sow44w')
participations = client.user_participations('f1ovb5rydm8s0go04oco0cgk0sow44w')
chair_groups = client.user_chair_of_groups('f1ovb5rydm8s0go04oco0cgk0sow44w')
team_contact_groups = client.user_team_contact_of_groups('f1ovb5rydm8s0go04oco0cgk0sow44w')

# Get affiliations
affiliations = client.affiliations
affiliation = client.affiliation(35662)  # Google LLC
participants = client.affiliation_participants(35662)
participations = client.affiliation_participations(35662)

# Translations
translations = client.translations
translation = client.translation(2)

# Ecosystems
ecosystems = client.ecosystems
ecosystem = client.ecosystem('data')

Models

General

This library provides models for various W3C API resources under the W3cApi::Models namespace.

Affiliation

The W3cApi::Models::Affiliation represents a W3C affiliation model that includes various attributes and methods to interact with affiliated entities.

Example 1. Fetching the affiliation index
> W3cApi::Hal.instance.register.fetch(:affiliation_index)
# =>
#  #<W3cApi::Models::AffiliationIndex:0x0000000123ecca38
#   @_global_register_id=:w3c_api,
#   @limit=100,
#   @links=
#    #<W3cApi::Models::AffiliationIndexLinkSet:0x00000001325b4a68
#     @_global_register_id=:w3c_api,
#     @affiliations=
#      [#<W3cApi::Models::AffiliationLink:0x000000011fe453c0
#        @_global_register_id=:w3c_api,
#        @deprecation=nil,
#        @href="https://api.w3.org/affiliations/1001",
#        @lang=nil,
#        @name=nil,
#        @profile=nil,
#        @templated=nil,
#        @title=
#         "Framkom (Forskningsaktiebolaget Medie-och Kommunikationsteknik)",
#        @type="Affiliation">,
#       #<W3cApi::Models::AffiliationLink:0x000000011fe232c0
#        @_global_register_id=:w3c_api,
#        @deprecation=nil,
#        @href="https://api.w3.org/affiliations/1003",
#        @lang=nil,
#        @name=nil,
#        @profile=nil,
#        @templated=nil,
#        @title="BackWeb Technologies, Inc.",
#        @type="Affiliation">,
#        ...
Example 2. Fetching a specific affiliation
> W3cApi::Hal.instance.register.fetch(:affiliation_resource, id: 35662)
# =>
#  #<W3cApi::Models::Affiliation:0x000000011de99d50
#   @id=35662,
#   @name="Google LLC",
#   @discr="organization",
# ... >

Command line interface

General

W3C API provides a command-line interface (CLI) for various operations.

The main executable is w3c_api.

By default, the output is in YAML format. You can specify the output format using the --format option, which accepts json or yaml.

Commands:
  # Work with W3C specifications
  w3c_api specification SUBCOMMAND ...ARGS
  # Work with W3C specification series
  w3c_api series SUBCOMMAND ...ARGS
  # Work with W3C groups
  w3c_api group SUBCOMMAND ...ARGS
  # Work with W3C users
  w3c_api user SUBCOMMAND ...ARGS
  # Work with W3C affiliations
  w3c_api affiliation SUBCOMMAND ...ARGS
  # Work with W3C translations
  w3c_api translation SUBCOMMAND ...ARGS
  # Work with W3C ecosystems
  w3c_api ecosystem SUBCOMMAND ...ARGS
  # Describe available commands or one specific command
  w3c_api help [COMMAND]

Specifications

This command provides access to W3C specifications.

Index

When fetching an index of specifications, for every specification, only the href and title attributes are provided.

# Fetch specifications
$ w3c_api specification fetch [OPTIONS]
# Fetch specifications with a specific status
$ w3c_api specification fetch --status=Recommendation
$ w3c_api specification fetch
- href: https://www.w3.org/TR/html5/
  title: HTML5
- href: https://www.w3.org/TR/css3-color/
  title: CSS Color Module Level 3

Get

Getting a specification provides all attributes of the specification.

# Fetch a specification
$ w3c_api specification fetch --shortname=webrtc
# Fetch a specific version of a specification
$ w3c_api specification fetch --shortname=webrtc --version=20241008
$ w3c_api specification fetch --shortname=webrtc
---
shortlink: https://www.w3.org/TR/webrtc/
description: "<p>This document defines a set of ECMAScript APIs in WebIDL to allow
  media to be sent to and received from another browser or device implementing the
  appropriate set of real-time protocols. This specification is being developed in
  conjunction with a protocol specification developed by the IETF RTCWEB group and
  an API specification to get access to local media devices.</p>"
title: 'WebRTC: Real-Time Communication in Browsers'
shortname: webrtc
editor_draft: https://w3c.github.io/webrtc-pc/
series_version: '1.0'
_links:
  self:
    href: https://api.w3.org/specifications/webrtc
  version_history:
    href: https://api.w3.org/specifications/webrtc/versions
  first_version:
    href: https://api.w3.org/specifications/webrtc/versions/20111027
    title: Working Draft
  latest_version:
    href: https://api.w3.org/specifications/webrtc/versions/20241008
    title: Recommendation
  series:
    href: https://api.w3.org/specification-series/webrtc

Versions

This command provides access to W3C specification versions given a shortname.

# Fetch versions of a specification
$ w3c_api specification versions --shortname=webrtc
$ w3c_api specification versions --shortname=webrtc
spec_versions:
- title: 'WebRTC: Real-Time Communication in Browsers'
  href: https://api.w3.org/specifications/webrtc/versions/20241008
- title: 'WebRTC: Real-Time Communication in Browsers'
  href: https://api.w3.org/specifications/webrtc/versions/20230306
- title: 'WebRTC: Real-Time Communication in Browsers'
  href: https://api.w3.org/specifications/webrtc/versions/20230301
# Additional versions omitted for brevity

Status

This command provides access to W3C specifications by status.

# Fetch specifications with a specific status
$ w3c_api specification fetch --status=Recommendation
$ w3c_api specification fetch --status=Recommendation
specifications:
- title: 'XML Schema Part 1: Structures Second Edition'
  href: https://api.w3.org/specifications/xmlschema-1
- title: 'XML Schema Part 2: Datatypes Second Edition'
  href: https://api.w3.org/specifications/xmlschema-2
- title: CSS Namespaces Module Level 3
  href: https://api.w3.org/specifications/css-namespaces-3
# Additional specifications omitted for brevity

Series

This command provides access to W3C specification series.

Index

Fetching an index of specification series.

# Fetch specification series
$ w3c_api series fetch [OPTIONS]
$ w3c_api series fetch
- shortname: html
  name: HTML
- shortname: css
  name: CSS
# Additional series omitted for brevity

Get

Getting a specification series by shortname.

# Fetch a specification series
$ w3c_api series fetch --shortname=webrtc
$ w3c_api series fetch --shortname=webrtc
---
shortname: webrtc
name: 'WebRTC: Real-Time Communication Between Browsers'
_links:
  self:
    href: https://api.w3.org/specification-series/webrtc
  specifications:
    href: https://api.w3.org/specification-series/webrtc/specifications
  current_specification:
    href: https://api.w3.org/specifications/webrtc

Specifications

This command provides access to specifications in a series.

# Fetch specifications in a series
$ w3c_api series specifications --shortname=webrtc
$ w3c_api series specifications --shortname=webrtc
---
specifications:
- title: 'WebRTC: Real-Time Communication in Browsers'
  href: https://api.w3.org/specifications/webrtc

Users

This command provides access to W3C users.

Important
User ID Formats

The W3C API uses both numeric IDs (e.g., 128112) and string IDs (e.g., f1ovb5rydm8s0go04oco0cgk0sow44w) for users. All user-related commands support both formats. The format depends on how the user is referenced in API responses.

Get

Getting a user by ID.

# Fetch a user with a numeric ID
$ w3c_api user fetch --hash=128112
# Fetch a user with a string ID
$ w3c_api user fetch --hash=f1ovb5rydm8s0go04oco0cgk0sow44w
$ w3c_api user fetch --hash=f1ovb5rydm8s0go04oco0cgk0sow44w
---
id: 128112
name: Jennifer Strickland
given: Jennifer
family: Strickland
discr: user
country_code: US
connected_accounts:
- created: '2021-03-12T22:06:06+00:00'
  service: github
  identifier: '57469'
  nickname: jenstrickland
  profile_picture: https://avatars.githubusercontent.com/u/57469?v=4
  href: https://github.com/jenstrickland
  _links:
    user:
      href: https://api.w3.org/users/f1ovb5rydm8s0go04oco0cgk0sow44w
_links:
  self:
    href: https://api.w3.org/users/f1ovb5rydm8s0go04oco0cgk0sow44w
  affiliations:
    href: https://api.w3.org/users/f1ovb5rydm8s0go04oco0cgk0sow44w/affiliations
  groups:
    href: https://api.w3.org/users/f1ovb5rydm8s0go04oco0cgk0sow44w/groups
  specifications:
    href: https://api.w3.org/users/f1ovb5rydm8s0go04oco0cgk0sow44w/specifications
  participations:
    href: https://api.w3.org/users/f1ovb5rydm8s0go04oco0cgk0sow44w/participations
  chair_of_groups:
    href: https://api.w3.org/users/f1ovb5rydm8s0go04oco0cgk0sow44w/chair-of-groups
  team_contact_of_groups:
    href: https://api.w3.org/users/f1ovb5rydm8s0go04oco0cgk0sow44w/team-contact-of-groups

Groups

Getting groups a user is a member of.

# Fetch groups a user is a member of
$ w3c_api user groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w
$ w3c_api user groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w
---
groups:
- href: https://api.w3.org/groups/wg/ag
  title: Accessibility Guidelines Working Group
- href: https://api.w3.org/groups/cg/global-inclusion
  title: Accessibility Internationalization Community Group
- href: https://api.w3.org/groups/wg/apa
  title: Accessible Platform Architectures Working Group
- href: https://api.w3.org/groups/wg/css
  title: Cascading Style Sheets (CSS) Working Group
- href: https://api.w3.org/groups/cg/coga-community
  title: Cognitive Accessibility Community Group
- href: https://api.w3.org/groups/cg/equity
  title: Equity Community Group
- href: https://api.w3.org/groups/wg/immersive-web
  title: Immersive Web Working Group
- href: https://api.w3.org/groups/cg/pwe
  title: Positive Work Environment Community Group
- href: https://api.w3.org/groups/cg/silver
  title: Silver Community Group
- href: https://api.w3.org/groups/wg/sdw
  title: Spatio-temporal Data on the Web Working Group
- href: https://api.w3.org/groups/cg/sustainability
  title: Sustainability Community Group
- href: https://api.w3.org/groups/ig/sustainableweb
  title: Sustainable Web Interest Group
- href: https://api.w3.org/groups/cg/w3process
  title: W3C Process Community Group
- href: https://api.w3.org/groups/wg/webapps
  title: Web Applications Working Group
- href: https://api.w3.org/groups/cg/webcomponents
  title: Web Components Community Group
- href: https://api.w3.org/groups/wg/webperf
  title: Web Performance Working Group

Specifications

Getting specifications a user has contributed to.

# Fetch specifications a user has contributed to
$ w3c_api user specifications --id=f1ovb5rydm8s0go04oco0cgk0sow44w
$ w3c_api user specifications --id=f1ovb5rydm8s0go04oco0cgk0sow44w
specifications:
- title: HTML 5.2
  href: https://api.w3.org/specifications/html52
- title: CSS Color Module Level 3
  href: https://api.w3.org/specifications/css-color-3
# Additional specifications omitted for brevity

Affiliations

Getting affiliations of a user.

# Fetch affiliations of a user
$ w3c_api user affiliations --id=f1ovb5rydm8s0go04oco0cgk0sow44w
$ w3c_api user affiliations --id=f1ovb5rydm8s0go04oco0cgk0sow44w
---
affiliations:
- href: https://api.w3.org/affiliations/1092
  title: MITRE Corporation

Participations

Getting participations of a user.

# Fetch participations of a user
$ w3c_api user participations --id=f1ovb5rydm8s0go04oco0cgk0sow44w
$ w3c_api user participations --id=f1ovb5rydm8s0go04oco0cgk0sow44w
---
participations:
- title: Silver Community Group
  href: https://api.w3.org/participations/38785
- title: Accessibility Guidelines Working Group
  href: https://api.w3.org/participations/41574
- title: Cognitive Accessibility Community Group
  href: https://api.w3.org/participations/38233
- title: Immersive Web Working Group
  href: https://api.w3.org/participations/43790
- title: Cascading Style Sheets (CSS) Working Group
  href: https://api.w3.org/participations/38783
- title: Positive Work Environment Community Group
  href: https://api.w3.org/participations/38784
- title: Web Performance Working Group
  href: https://api.w3.org/participations/38786
- title: Spatio-temporal Data on the Web Working Group
  href: https://api.w3.org/participations/44558
- title: W3C Process Community Group
  href: https://api.w3.org/participations/39267
- title: Equity Community Group
  href: https://api.w3.org/participations/39352
- title: Web Components Community Group
  href: https://api.w3.org/participations/40553
- title: Accessible Platform Architectures Working Group
  href: https://api.w3.org/participations/36682
- title: Sustainability Community Group
  href: https://api.w3.org/participations/41861
- title: Web Applications Working Group
  href: https://api.w3.org/participations/43789
- title: Accessibility Internationalization Community Group
  href: https://api.w3.org/participations/43788
- title: Sustainable Web Interest Group
  href: https://api.w3.org/participations/44152

Chair of Groups

Getting groups a user chairs.

# Fetch groups a user chairs
$ w3c_api user chair-of-groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w
$ w3c_api user chair-of-groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w
---
groups:
- href: https://api.w3.org/groups/cg/equity
  title: Equity Community Group

Team Contact of Groups

Getting groups a user is a team contact of.

# Fetch groups a user is a team contact of
$ w3c_api user team-contact-of-groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w
$ w3c_api user team-contact-of-groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w
groups:
- name: Web Platform Working Group
  href: https://api.w3.org/groups/72825
- name: Internationalization Working Group
  href: https://api.w3.org/groups/32113
# Additional groups omitted for brevity

Groups

This command provides access to W3C groups.

Index

Fetching an index of groups.

# Fetch groups
$ w3c_api group fetch [OPTIONS]
$ w3c_api group fetch
---
groups:
- href: https://api.w3.org/groups/tf/ab-liaisons-to-bod
  title: AB Liaisons to the Board of Directors
- href: https://api.w3.org/groups/cg/a11yedge
  title: Accessibility at the Edge Community Group
- href: https://api.w3.org/groups/tf/wcag-act
  title: Accessibility Conformance Testing (ACT) Task Force
- href: https://api.w3.org/groups/cg/a11y-discov-vocab
  title: Accessibility Discoverability Vocabulary for Schema.org Community Group
# Additional groups omitted for brevity

Get

Getting a group by ID.

# Fetch a group
$ w3c_api group fetch --id=109735
---
id: 109735
name: Immersive Web Working Group
type: working group
description: The mission of the Immersive Web Working Group is to help bring high-performance
  Virtual Reality (VR) and Augmented Reality (AR) (collectively known as XR) to the
  open Web via APIs to interact with XR devices and sensors in browsers.
shortname: immersive-web
discr: w3cgroup
start_date: '2018-09-24'
end_date: '2026-09-25'
is_closed: false
_links:
  self:
    href: https://api.w3.org/groups/wg/immersive-web
  homepage:
    href: https://www.w3.org/immersive-web/

Chairs

Fetching chairs for a group.

# Fetch chairs for a group
$ w3c_api group chairs --id={id}
$ w3c_api group chairs --id=109735
---
_links:
  self:
    href: https://api.w3.org/groups/109735/chairs?page=1&items=100
    type: W3cApi::Models::ChairIndex
  first:
    href: https://api.w3.org/groups/109735/chairs?page=1&items=100
    type: W3cApi::Models::ChairIndex
  last:
    href: https://api.w3.org/groups/109735/chairs?page=1&items=100
    type: W3cApi::Models::ChairIndex
  up:
    href: https://api.w3.org/groups/109735
    type: W3cApi::Models::ChairIndex
  chairs:
  - href: https://api.w3.org/users/basy63arxl448c8co0og8ocosocgc0w
    title: Ada Rose Cannon
    type: User
  - href: https://api.w3.org/users/l88ca27n2b4sk00cogosk0skw4s8osc
    title: Chris Wilson
    type: User
  - href: https://api.w3.org/users/m99jqkpi9m8oww84kw4gwccgc4g0ogs
    title: Ayşegül Yönet
    type: User

Team contacts

Fetching team contacts for a group.

# Fetch team contacts for a group
$ w3c_api group team-contacts --id={id}
$ w3c_api group team-contacts --id=109735
---
_links:
  self:
    href: https://api.w3.org/groups/109735/teamcontacts?page=1&items=100
    type: W3cApi::Models::TeamContactIndex
  first:
    href: https://api.w3.org/groups/109735/teamcontacts?page=1&items=100
    type: W3cApi::Models::TeamContactIndex
  last:
    href: https://api.w3.org/groups/109735/teamcontacts?page=1&items=100
    type: W3cApi::Models::TeamContactIndex
  up:
    href: https://api.w3.org/groups/109735
    type: W3cApi::Models::TeamContactIndex
  team-contacts:
  - href: https://api.w3.org/users/1eb2xr7ab6zo0k8440o48swso408ksc
    title: Atsushi Shimono
    type: User

Participations

Fetching participations for a group.

# Fetch participations for a group
$ w3c_api group participations --id={id}
$ w3c_api group participations --id=109735
---
_links:
  self:
    href: https://api.w3.org/groups/109735/participations?page=1&items=100
    type: ParticipationIndex
  first:
    href: https://api.w3.org/groups/109735/participations?page=1&items=100
    type: ParticipationIndex
  last:
    href: https://api.w3.org/groups/109735/participations?page=1&items=100
    type: ParticipationIndex
  up:
    href: https://api.w3.org/groups/109735
    type: ParticipationIndex
  participations:
  - href: https://api.w3.org/participations/43367
    title: Kodansha, Publishers, Ltd.
    type: Participation
  - href: https://api.w3.org/participations/43368
    title: Institut National de Recherche en Informatique et en Automatique (Inria)
    type: Participation
  - href: https://api.w3.org/participations/43391
    title: Igalia
    type: Participation
  - href: https://api.w3.org/participations/43415
    title: Christine Perey
    type: Participation

Specifications

Fetching specifications for a group.

# Fetch specifications for a group
$ w3c_api group specifications --id=109735
$ w3c_api group specifications --id=109735
---
  specifications:
  - href: https://api.w3.org/specifications/webxr-lighting-estimation-1
    title: WebXR Lighting Estimation API Level 1
    type: Specification
  - href: https://api.w3.org/specifications/webxr-ar-module-1
    title: WebXR Augmented Reality Module - Level 1
    type: Specification
  - href: https://api.w3.org/specifications/webxr-gamepads-module-1
    title: WebXR Gamepads Module - Level 1
    type: Specification
  - href: https://api.w3.org/specifications/webxrlayers-1
    title: WebXR Layers API Level 1
    type: Specification
  - href: https://api.w3.org/specifications/webxr-hand-input-1
    title: WebXR Hand Input Module - Level 1
    type: Specification
  - href: https://api.w3.org/specifications/webxr-hit-test-1
    title: WebXR Hit Test Module
    type: Specification
  - href: https://api.w3.org/specifications/webxr-depth-sensing-1
    title: WebXR Depth Sensing Module
    type: Specification
  - href: https://api.w3.org/specifications/webxr-dom-overlays-1
    title: WebXR DOM Overlays Module
    type: Specification
  - href: https://api.w3.org/specifications/webxr
    title: WebXR Device API
    type: Specification

Users

Fetching users for a group.

# Fetch users for a group
$ w3c_api group users --id=109735
$ w3c_api group users --id=109735
---
  users:
  - href: https://api.w3.org/users/9o1jsmhi8ysk088w0k4g00wsssk4c8c
    title: Muadh Al Kalbani
    type: User
  - href: https://api.w3.org/users/rqjspzlmiq8c0kk8goos4c480w8wccs
    title: Matthew Atkinson
    type: User
  - href: https://api.w3.org/users/32hnccz98a68sk0kcog8c4wo4sgckkw
    title: Ashwin Balasubramaniyan
    type: User
  - href: https://api.w3.org/users/ff80kfl6a0gso4oo8s40cg4c4wccgs0
    title: Trevor Baron
    type: User

Charters

Fetching charters for a group.

# Fetch charters for a group
$ w3c_api group charters --id=109735
$ w3c_api group charters --id=109735
---
  charters:
  - href: https://api.w3.org/groups/109735/charters/361
    title: 2018-09-24 -> 2020-03-01
    type: Charter
  - href: https://api.w3.org/groups/109735/charters/405
    title: 2020-05-12 -> 2022-06-01
    type: Charter
  - href: https://api.w3.org/groups/109735/charters/464
    title: 2022-07-08 -> 2024-07-07
    type: Charter
  - href: https://api.w3.org/groups/109735/charters/514
    title: 2024-09-26 -> 2026-09-25
    type: Charter

Translation

This command provides access to W3C translations.

Index

Fetching an index of translations.

# Fetch translations
$ w3c_api translation fetch [OPTIONS]
$ w3c_api translation fetch
---
    "translations": [
      {
        "href": "https://api.w3.org/translations/2",
        "title": "Vidéo : introduction à l’accessibilité web et aux standards du W3C",
        "language": "fr"
      },
      {
        "href": "https://api.w3.org/translations/3",
        "title": "Vídeo de Introducción a la Accesibilidad Web y Estándares del W3C",
        "language": "es"
      },
      {
        "href": "https://api.w3.org/translations/4",
        "title": "Video-introductie over Web-toegankelijkheid en W3C-standaarden",
        "language": "nl"
      },
      {
        "href": "https://api.w3.org/translations/5",
        "title": "网页无障碍和W3C标准的介绍视频",
        "language": "zh_Hans"
      },...

Get

Getting a translation by ID.

# Fetch a translation
$ w3c_api translation fetch --id=467
$ w3c_api translation fetch --id=467
---
_links:
  self:
    href: https://api.w3.org/translations/467
    type: Translation
uri: http://maujor.com/w3c/xml-base.html
title: XML Base
language: pt_BR
published: '2005-09-23T00:00:00+00:00'
authorized: false
call-for-translation:
  _links:
    self:
      href: https://api.w3.org/callsfortranslation/28
      type: CallForTranslation
    translations:
      href: https://api.w3.org/callsfortranslation/28/translations
      type: TranslationIndex
  title: XML Base
states:
- published
translators:
- _links:
    self:
      href: https://api.w3.org/users/91oj8wozeb0o4wcoo8wswkcsw4oog48
      type: User
    affiliations:
      href: https://api.w3.org/users/91oj8wozeb0o4wcoo8wswkcsw4oog48/affiliations
      type: W3cApi::Models::AffiliationIndex
    groups:
      href: https://api.w3.org/users/91oj8wozeb0o4wcoo8wswkcsw4oog48/groups
      type: GroupIndex
    specifications:
      href: https://api.w3.org/users/91oj8wozeb0o4wcoo8wswkcsw4oog48/specifications
      type: SpecificationIndex
    participations:
      href: https://api.w3.org/users/91oj8wozeb0o4wcoo8wswkcsw4oog48/participations
      type: ParticipationIndex
  id: '112282'
  name: Maurício Samy Silva
  given: Maurício
  family: Samy Silva
  discr: user

Ecosystem

This command provides access to W3C ecosystems.

Index

Fetching an index of ecosystems.

# Fetch ecosystems
$ w3c_api ecosystem fetch [OPTIONS]
$ w3c_api ecosystem fetch
---
_links:
  self:
    href: https://api.w3.org/ecosystems?embed=0&page=1&items=100
    type: W3cApi::Models::EcosystemIndex
  first:
    href: https://api.w3.org/ecosystems?embed=0&page=1&items=100
    type: W3cApi::Models::EcosystemIndex
  last:
    href: https://api.w3.org/ecosystems?embed=0&page=1&items=100
    type: W3cApi::Models::EcosystemIndex
  ecosystems:
  - href: https://api.w3.org/ecosystems/advertising
    title: Web Advertising
    type: Ecosystem
  - href: https://api.w3.org/ecosystems/e-commerce
    title: E-commerce
    type: Ecosystem
  - href: https://api.w3.org/ecosystems/media
    title: Media & Entertainment
    type: Ecosystem
  - href: https://api.w3.org/ecosystems/network-communications
    title: Network & Communications
    type: Ecosystem
  - href: https://api.w3.org/ecosystems/publishing
    title: Publishing
    type: Ecosystem
  - href: https://api.w3.org/ecosystems/smart-cities
    title: Smart Cities
    type: Ecosystem
  - href: https://api.w3.org/ecosystems/automotive-transportation
    title: Automotive & Transportation
    type: Ecosystem
  - href: https://api.w3.org/ecosystems/web-of-things
    title: Web of Things
    type: Ecosystem
  - href: https://api.w3.org/ecosystems/data
    title: Data and knowledge
    type: Ecosystem

Get

Getting an ecosystem by shortname.

# Fetch an ecosystem
$ w3c_api ecosystem fetch --shortname={shortname}
$ w3c_api ecosystem fetch --shortname=data
---
_links:
  self:
    href: https://api.w3.org/ecosystems/data
    type: Ecosystem
  champion:
    href: https://api.w3.org/users/t891ludoisggsccsw44o8goccc0s0ks
    title: Pierre-Antoine Champin
    type: User
  evangelists:
    href: https://api.w3.org/ecosystems/data/evangelists
    type: EvangelistIndex
  groups:
    href: https://api.w3.org/ecosystems/data/groups
    type: GroupIndex
  member-organizations:
    href: https://api.w3.org/ecosystems/data/member-organizations
    type: AffiliationIndex
name: Data and knowledge
shortname: data

Evangelists

Getting evangelists for an ecosystem.

# Fetch evangelists for an ecosystem
$ w3c_api ecosystem evangelists --shortname={shortname}
$ w3c_api ecosystem evangelists --shortname=publishing
---
_links:
  self:
    href: https://api.w3.org/ecosystems/publishing/evangelists?page=1&items=100
    type: EvangelistIndex
  first:
    href: https://api.w3.org/ecosystems/publishing/evangelists?page=1&items=100
    type: EvangelistIndex
  last:
    href: https://api.w3.org/ecosystems/publishing/evangelists?page=1&items=100
    type: EvangelistIndex
  up:
    href: https://api.w3.org/ecosystems/publishing
    type: EvangelistIndex
  evangelists:
  - href: https://api.w3.org/users/ni26g4n5gqskg8k80ssgw0ko048wgwg
    title: Bill Kasdorf
    type: User
  - href: https://api.w3.org/users/a5eur9p2iyo0ws00448w4gcw4c8sock
    title: Daihei Shiohama
    type: User
  - href: https://api.w3.org/users/qdkk81rtp344c44g0osoocgwwc8o4ss
    title: Bobby Tung
    type: User

Groups

Getting groups for an ecosystem.

# Fetch groups for an ecosystem
$ w3c_api ecosystem groups --shortname={shortname}
$ w3c_api ecosystem groups --shortname=publishing
---
---
_links:
  self:
    href: https://api.w3.org/ecosystems/publishing/groups?page=1&items=100
    type: GroupIndex
  first:
    href: https://api.w3.org/ecosystems/publishing/groups?page=1&items=100
    type: GroupIndex
  last:
    href: https://api.w3.org/ecosystems/publishing/groups?page=1&items=100
    type: GroupIndex
  up:
    href: https://api.w3.org/ecosystems/publishing
    type: GroupIndex
  groups:
  - href: https://api.w3.org/groups/cg/a11y-discov-vocab
    title: Accessibility Discoverability Vocabulary for Schema.org Community Group
    type: Group
  - href: https://api.w3.org/groups/cg/epub3
    title: EPUB 3 Community Group
    type: Group
  - href: https://api.w3.org/groups/bg/publishingbg
    title: Publishing Business Group
    type: Group
  - href: https://api.w3.org/groups/cg/publishingcg
    title: Publishing Community Group
    type: Group
  - href: https://api.w3.org/groups/wg/pm
    title: Publishing Maintenance Working Group
    type: Group

Member organizations

Getting member organizations for an ecosystem.

# Fetch member organizations for an ecosystem
$ w3c_api ecosystem member-organizations --shortname={shortname}
$ w3c_api ecosystem member-organizations --shortname=publishing
---
_links:
  self:
    href: https://api.w3.org/ecosystems/publishing/member-organizations?page=1&items=100
    type: W3cApi::Models::AffiliationIndex
  first:
    href: https://api.w3.org/ecosystems/publishing/member-organizations?page=1&items=100
    type: W3cApi::Models::AffiliationIndex
  last:
    href: https://api.w3.org/ecosystems/publishing/member-organizations?page=1&items=100
    type: W3cApi::Models::AffiliationIndex
  up:
    href: https://api.w3.org/ecosystems/publishing
    type: W3cApi::Models::AffiliationIndex
  affiliations:
  - href: https://api.w3.org/affiliations/56103
    title: ACCESS CO., LTD.
    type: Affiliation
  - href: https://api.w3.org/affiliations/1057
    title: Adobe
    type: Affiliation
  - href: https://api.w3.org/affiliations/108617
    title: Amazon
    type: Affiliation
  - href: https://api.w3.org/affiliations/43420
    title: Apache Software Foundation
    type: Affiliation
...

Affiliations

Index

Fetching an index of affiliations.

# Fetch affiliations
$ w3c_api affiliation fetch [OPTIONS]
$ w3c_api affiliation fetch

Get

Getting an affiliation by ID.

# Fetch an affiliation
$ w3c_api affiliation fetch --id={id}
# Fetch an affiliation
$ w3c_api affiliation fetch --id=1001
---
_links:
  self:
    href: https://api.w3.org/affiliations/1001
    type: Affiliation
  homepage:
    href: http://www.framkom.se
    type: String
  participants:
    href: https://api.w3.org/affiliations/1001/participants
    type: Participant
  participations:
    href: https://api.w3.org/affiliations/1001/participations
    type: Participation
id: 1001
name: Framkom (Forskningsaktiebolaget Medie-och Kommunikationsteknik)
discr: organization
is-member: false
is-member-association: false
is-partner-member: false

Participants

Getting participants for an affiliation.

# Fetch participants for an affiliation
$ w3c_api affiliation participants --id={id}
$ w3c_api affiliation participants --id=1104
---
_links:
  self:
    href: https://api.w3.org/affiliations/1104/participants?page=1&items=100
    type: W3cApi::Models::ParticipantIndex
  first:
    href: https://api.w3.org/affiliations/1104/participants?page=1&items=100
    type: W3cApi::Models::ParticipantIndex
  last:
    href: https://api.w3.org/affiliations/1104/participants?page=1&items=100
    type: W3cApi::Models::ParticipantIndex
  up:
    href: https://api.w3.org/affiliations/1104
    type: W3cApi::Models::ParticipantIndex
  participants:
  - href: https://api.w3.org/users/j2d10std2l4ck448woccowg8cg8g8go
    title: Jean-Luc Chevillard
    type: User

Participations

Getting participations for an affiliation.

# Fetch participations for an affiliation
$ w3c_api affiliation participations --id={id}
$ w3c_api affiliation participations --id=1104
---
_links:
  self:
    href: https://api.w3.org/affiliations/1104/participations?page=1&items=100
    type: ParticipationIndex
  first:
    href: https://api.w3.org/affiliations/1104/participations?page=1&items=100
    type: ParticipationIndex
  last:
    href: https://api.w3.org/affiliations/1104/participations?page=1&items=100
    type: ParticipationIndex
  up:
    href: https://api.w3.org/affiliations/1104
    type: ParticipationIndex
  participations:
  - href: https://api.w3.org/participations/32932
    title: XQuery and XSLT Extensions Community Group
    type: Participation

Participations

Get

Getting a participation by ID.

# Fetch a participation
$ w3c_api participation fetch --id={id}
$ w3c_api participation fetch --id=32932
---
_links:
  self:
    href: https://api.w3.org/participations/32932
    type: Participation
  group:
    href: https://api.w3.org/groups/cg/xslt-40
    title: XQuery and XSLT Extensions Community Group
    type: Group
  organization:
    href: https://api.w3.org/affiliations/1104
    title: CNRS
    type: Affiliation
  participants:
    href: https://api.w3.org/participations/32932/participants
    type: W3cApi::Models::ParticipantIndex
individual: false
invited-expert: false
created: '2020-11-28T05:59:24+00:00'

Participants

Getting participants for a participation.

# Fetch participants for a participation
$ w3c_api participation participants --id={id}
$ w3c_api participation participants --id=32932
---
_links:
  self:
    href: https://api.w3.org/participations/32932/participants?page=1&items=100
    type: W3cApi::Models::ParticipantIndex
  first:
    href: https://api.w3.org/participations/32932/participants?page=1&items=100
    type: W3cApi::Models::ParticipantIndex
  last:
    href: https://api.w3.org/participations/32932/participants?page=1&items=100
    type: W3cApi::Models::ParticipantIndex
  up:
    href: https://api.w3.org/participations/32932
    type: W3cApi::Models::ParticipantIndex
  participants:
  - href: https://api.w3.org/users/j2d10std2l4ck448woccowg8cg8g8go
    title: Jean-Luc Chevillard
    type: User

Debug mode

The library supports a debug mode that can be enabled by setting the DEBUG_API environment variable to a non-empty value.

This will print the HTTP requests and responses made by the API client.

Example 3. Enabling debug mode on the command line
# Enable debug mode
$ export DEBUG_API=1
$ w3c_api specification fetch --shortname=webrtc
Example 4. Enabling debug mode in Ruby
ENV["DEBUG_API"] = "1"
W3cApi::Hal.instance.register.fetch(:specification_index)

This project is licensed under the BSD 2-clause License. See the LICENSE.md file for details.

Copyright Ribose.