Purpose
A Ruby wrapper for the W3C web API with a CLI interface. This gem provides:
-
A complete client for the W3C API
-
Data models created with lutaml-model for all W3C API resources
-
A command-line interface using Thor following GitHub CLI patterns
This gem is developed against the W3C API documented at https://api.w3.org/doc.
Ruby API
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')
# Get specification series
series_list = client.series
series = client.series_by_shortname('webrtc')
series_specs = client.series_specifications('webrtc')
# 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)
# 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)
# Work with other resources
translations = client.translations
translation = client.translation(2)
ecosystems = client.ecosystems
ecosystem = client.ecosystem('data')
Command line interface
General
W3C API provides a command-line interface (CLI) for various operations.
The main executable is w3c_api.
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 in JSON format
$ w3c_api specification fetch --format=json
# Fetch specifications in YAML format
$ w3c_api specification fetch --format=yaml
# Fetch specifications with a specific status
$ w3c_api specification fetch --status=Recommendation
$ w3c_api specification fetch --format=yaml
- 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 specification in JSON format
$ w3c_api specification fetch --shortname=webrtc --format=json
# Fetch a specification in YAML format
$ w3c_api specification fetch --shortname=webrtc --format=yaml
# Fetch a specific version of a specification
$ w3c_api specification fetch --shortname=webrtc --version=20241008
$ w3c_api specification fetch --shortname=webrtc --format=yaml
---
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
# Fetch versions in JSON format
$ w3c_api specification versions --shortname=webrtc --format=json
# Fetch versions in YAML format
$ w3c_api specification versions --shortname=webrtc --format=yaml
$ w3c_api specification versions --shortname=webrtc --format=yaml
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
# Fetch specifications with a specific status in JSON format
$ w3c_api specification fetch --status=Recommendation --format=json
# Fetch specifications with a specific status in YAML format
$ w3c_api specification fetch --status=Recommendation --format=yaml
$ w3c_api specification fetch --status=Recommendation --format=yaml
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]
# Fetch specification series in JSON format
$ w3c_api series fetch --format=json
# Fetch specification series in YAML format
$ w3c_api series fetch --format=yaml
$ w3c_api series fetch --format=yaml
- 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
# Fetch a specification series in JSON format
$ w3c_api series fetch --shortname=webrtc --format=json
# Fetch a specification series in YAML format
$ w3c_api series fetch --shortname=webrtc --format=yaml
$ w3c_api series fetch --shortname=webrtc --format=yaml
---
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
# Fetch specifications in a series in JSON format
$ w3c_api series specifications --shortname=webrtc --format=json
# Fetch specifications in a series in YAML format
$ w3c_api series specifications --shortname=webrtc --format=yaml
$ w3c_api series specifications --shortname=webrtc --format=yaml
---
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., |
Get
Getting a user by ID.
# Fetch a user with a numeric ID
$ w3c_api user fetch --id=128112
# Fetch a user with a string ID
$ w3c_api user fetch --id=f1ovb5rydm8s0go04oco0cgk0sow44w
# Fetch a user in JSON format
$ w3c_api user fetch --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=json
# Fetch a user in YAML format
$ w3c_api user fetch --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
$ w3c_api user fetch --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
---
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
# Fetch groups a user is a member of in JSON format
$ w3c_api user groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=json
# Fetch groups a user is a member of in YAML format
$ w3c_api user groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
$ w3c_api user groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
---
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
# Fetch specifications a user has contributed to in JSON format
$ w3c_api user specifications --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=json
# Fetch specifications a user has contributed to in YAML format
$ w3c_api user specifications --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
$ w3c_api user specifications --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
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
# Fetch affiliations of a user in JSON format
$ w3c_api user affiliations --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=json
# Fetch affiliations of a user in YAML format
$ w3c_api user affiliations --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
$ w3c_api user affiliations --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
---
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
# Fetch participations of a user in JSON format
$ w3c_api user participations --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=json
# Fetch participations of a user in YAML format
$ w3c_api user participations --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
$ w3c_api user participations --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
---
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
# Fetch groups a user chairs in JSON format
$ w3c_api user chair-of-groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=json
# Fetch groups a user chairs in YAML format
$ w3c_api user chair-of-groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
$ w3c_api user chair-of-groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
---
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
# Fetch groups a user is a team contact of in JSON format
$ w3c_api user team-contact-of-groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=json
# Fetch groups a user is a team contact of in YAML format
$ w3c_api user team-contact-of-groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
$ w3c_api user team-contact-of-groups --id=f1ovb5rydm8s0go04oco0cgk0sow44w --format=yaml
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]
# Fetch groups in JSON format
$ w3c_api group fetch --format=json
# Fetch groups in YAML format
$ w3c_api group fetch --format=yaml
$ w3c_api group fetch --format=yaml
---
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
# Fetch a group in JSON format
$ w3c_api group fetch --id=109735 --format=json
# Fetch a group in YAML format
$ w3c_api group fetch --id=109735 --format=yaml
---
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/
users:
href: https://api.w3.org/groups/wg/immersive-web/users
services:
href: https://api.w3.org/groups/wg/immersive-web/services
specifications:
href: https://api.w3.org/groups/wg/immersive-web/specifications
chairs:
href: https://api.w3.org/groups/wg/immersive-web/chairs
team_contacts:
href: https://api.w3.org/groups/wg/immersive-web/teamcontacts
charters:
href: https://api.w3.org/groups/wg/immersive-web/charters
active_charter:
href: https://api.w3.org/groups/wg/immersive-web/charters/514
join:
href: https://www.w3.org/groups/wg/immersive-web/join
pp_status:
href: https://www.w3.org/groups/wg/immersive-web/ipr
participations:
href: https://api.w3.org/groups/wg/immersive-web/participations
Users
Getting users in a group.
# Fetch users in a group
$ w3c_api group users --id=109735
# Fetch users in a group in JSON format
$ w3c_api group users --id=109735 --format=json
# Fetch users in a group in YAML format
$ w3c_api group users --id=109735 --format=yaml
$ w3c_api group users --id=109735 --format=yaml
---
users:
- href: https://api.w3.org/users/9o1jsmhi8ysk088w0k4g00wsssk4c8c
title: Muadh Al Kalbani
- href: https://api.w3.org/users/rqjspzlmiq8c0kk8goos4c480w8wccs
title: Matthew Atkinson
- href: https://api.w3.org/users/32hnccz98a68sk0kcog8c4wo4sgckkw
title: Ashwin Balasubramaniyan
- href: https://api.w3.org/users/ff80kfl6a0gso4oo8s40cg4c4wccgs0
title: Trevor Baron
- href: https://api.w3.org/users/icpnypf3mfsckc848s0cgwckgwgcwks
title: Piotr Bialecki
- href: https://api.w3.org/users/cfck5b7g1h4wkkco80w08g488kg4c0c
title: Michael Blix
- href: https://api.w3.org/users/bigukrtur3co8s04k4kocg04ow0oowo
title: Artem Bolgar
Specifications
Getting specifications of a group.
# Fetch specifications of a group
$ w3c_api group specifications --id=109735
# Fetch specifications of a group in JSON format
$ w3c_api group specifications --id=109735 --format=json
# Fetch specifications of a group in YAML format
$ w3c_api group specifications --id=109735 --format=yaml
$ w3c_api group specifications --id=109735 --format=yaml
---
specifications:
- title: WebXR Lighting Estimation API Level 1
href: https://api.w3.org/specifications/webxr-lighting-estimation-1
- title: WebXR Augmented Reality Module - Level 1
href: https://api.w3.org/specifications/webxr-ar-module-1
- title: WebXR Gamepads Module - Level 1
href: https://api.w3.org/specifications/webxr-gamepads-module-1
- title: WebXR Layers API Level 1
href: https://api.w3.org/specifications/webxrlayers-1
# Additional specifications omitted for brevity
Charters
Getting charters of a group.
# Fetch charters of a group
$ w3c_api group charters --id=109735
# Fetch charters of a group in JSON format
$ w3c_api group charters --id=109735 --format=json
# Fetch charters of a group in YAML format
$ w3c_api group charters --id=109735 --format=yaml
$ w3c_api group charters --id=109735 --format=yaml
---
charters:
- href: https://api.w3.org/groups/109735/charters/361
title: 2018-09-24 -> 2020-03-01
- href: https://api.w3.org/groups/109735/charters/405
title: 2020-05-12 -> 2022-06-01
- href: https://api.w3.org/groups/109735/charters/464
title: 2022-07-08 -> 2024-07-07
- href: https://api.w3.org/groups/109735/charters/514
title: 2024-09-26 -> 2026-09-25
Chairs
Getting chairs of a group.
# Fetch chairs of a group
$ w3c_api group chairs --id=109735
# Fetch chairs of a group in JSON format
$ w3c_api group chairs --id=109735 --format=json
# Fetch chairs of a group in YAML format
$ w3c_api group chairs --id=109735 --format=yaml
$ w3c_api group chairs --id=109735 --format=yaml
---
users:
- href: https://api.w3.org/users/basy63arxl448c8co0og8ocosocgc0w
title: Ada Rose Cannon
- href: https://api.w3.org/users/l88ca27n2b4sk00cogosk0skw4s8osc
title: Chris Wilson
- href: https://api.w3.org/users/m99jqkpi9m8oww84kw4gwccgc4g0ogs
title: Ayşegül Yönet
Team Contacts
Getting team contacts of a group.
# Fetch team contacts of a group
$ w3c_api group team_contacts --id=109735
# Fetch team contacts of a group in JSON format
$ w3c_api group team_contacts --id=109735 --format=json
# Fetch team contacts of a group in YAML format
$ w3c_api group team_contacts --id=109735 --format=yaml
$ w3c_api group team_contacts --id=109735 --format=yaml
---
users:
- href: https://api.w3.org/users/1eb2xr7ab6zo0k8440o48swso408ksc
title: Atsushi Shimono
Affiliations
This command provides access to W3C affiliations (organizations).
Index
Fetching an index of affiliations.
# Fetch affiliations
$ w3c_api affiliation fetch [OPTIONS]
# Fetch affiliations in JSON format
$ w3c_api affiliation fetch --format=json
# Fetch affiliations in YAML format
$ w3c_api affiliation fetch --format=yaml
$ w3c_api affiliation fetch --format=yaml
---
affiliations:
- href: https://api.w3.org/affiliations/1001
title: Framkom (Forskningsaktiebolaget Medie-och Kommunikationsteknik)
- href: https://api.w3.org/affiliations/1003
title: BackWeb Technologies, Inc.
- href: https://api.w3.org/affiliations/1005
title: Bull S.A.
- href: https://api.w3.org/affiliations/1011
title: Digital Island, Inc.
- href: https://api.w3.org/affiliations/1013
title: University of Bristol
- href: https://api.w3.org/affiliations/1014
title: Internet Association Japan
# Additional affiliations omitted for brevity
Get
Getting an affiliation by ID.
# Fetch an affiliation
$ w3c_api affiliation fetch --id=35662
# Fetch an affiliation in JSON format
$ w3c_api affiliation fetch --id=35662 --format=json
# Fetch an affiliation in YAML format
$ w3c_api affiliation fetch --id=35662 --format=yaml
$ w3c_api affiliation fetch --id=35662 --format=yaml
---
affiliations:
- id: 35662
name: Google LLC
is_member: true
is_member_association: false
is_partner_member: false
_links:
self:
href: https://api.w3.org/affiliations/35662
participants:
href: https://api.w3.org/affiliations/35662/participants
participations:
href: https://api.w3.org/affiliations/35662/participations
Participants
Getting participants of an affiliation.
# Fetch participants of an affiliation
$ w3c_api affiliation participants --id=35662
# Fetch participants of an affiliation in JSON format
$ w3c_api affiliation participants --id=35662 --format=json
# Fetch participants of an affiliation in YAML format
$ w3c_api affiliation participants --id=35662 --format=yaml
$ w3c_api affiliation participants --id=35662 --format=yaml
---
users:
- href: https://api.w3.org/users/p3dte6mpoj4sgw888w8kw4w4skwosck
title: Tab Atkins Jr.
- href: https://api.w3.org/users/l88ca27n2b4sk00cogosk0skw4s8osc
title: Chris Wilson
- href: https://api.w3.org/users/kjqsxbe6kioko4s88s4wocws848kgw8
title: David Baron
- href: https://api.w3.org/users/t9qq83owlzkck404w0o44so8owc00gg
title: Rune Lillesveen
- href: https://api.w3.org/users/jviqbqcbem8w4gkgwcscoc400skcwwk
title: Koji Ishii
# Additional participants omitted for brevity
Participations
Getting participations of an affiliation.
# Fetch participations of an affiliation
$ w3c_api affiliation participations --id=35662
# Fetch participations of an affiliation in JSON format
$ w3c_api affiliation participations --id=35662 --format=json
# Fetch participations of an affiliation in YAML format
$ w3c_api affiliation participations --id=35662 --format=yaml
$ w3c_api affiliation participations --id=35662 --format=yaml
---
participations:
- title: Patents and Standards Interest Group
href: https://api.w3.org/participations/3092
- title: Media and Entertainment Interest Group
href: https://api.w3.org/participations/3115
- title: JSON for Linked Data Community Group
href: https://api.w3.org/participations/3121
- title: Games Community Group
href: https://api.w3.org/participations/3124
Ecosystems
This command provides access to W3C ecosystems.
Index
Fetching an index of ecosystems.
# Fetch ecosystems
$ w3c_api ecosystem fetch
# Fetch ecosystems in JSON format
$ w3c_api ecosystem fetch --format=json
# Fetch ecosystems in YAML format
$ w3c_api ecosystem fetch --format=yaml
$ w3c_api ecosystem fetch --format=yaml
---
ecosystems:
- href: https://api.w3.org/ecosystems/advertising
title: Web Advertising
- href: https://api.w3.org/ecosystems/e-commerce
title: E-commerce
- href: https://api.w3.org/ecosystems/media
title: Media & Entertainment
- href: https://api.w3.org/ecosystems/network-communications
title: Network & Communications
- href: https://api.w3.org/ecosystems/publishing
title: Publishing
- href: https://api.w3.org/ecosystems/smart-cities
title: Smart Cities
- href: https://api.w3.org/ecosystems/automotive-transportation
title: Automotive & Transportation
- href: https://api.w3.org/ecosystems/web-of-things
title: Web of Things
- href: https://api.w3.org/ecosystems/data
title: Data and knowledge
Get
Getting an ecosystem by shortname.
# Fetch an ecosystem
$ w3c_api ecosystem fetch --shortname=data
# Fetch an ecosystem in JSON format
$ w3c_api ecosystem fetch --shortname=data --format=json
# Fetch an ecosystem in YAML format
$ w3c_api ecosystem fetch --shortname=data --format=yaml
$ w3c_api ecosystem fetch --shortname=data --format=yaml
---
name: Data and knowledge
shortname: data
_links:
self:
href: https://api.w3.org/ecosystems/data
champion:
href: https://api.w3.org/users/t891ludoisggsccsw44o8goccc0s0ks
title: Pierre-Antoine Champin
evangelists:
href: https://api.w3.org/ecosystems/data/evangelists
groups:
href: https://api.w3.org/ecosystems/data/groups
member_organizations:
href: https://api.w3.org/ecosystems/data/member-organizations
Groups
Getting groups in an ecosystem.
# Fetch groups in an ecosystem
$ w3c_api ecosystem groups --shortname=data
# Fetch groups in an ecosystem in JSON format
$ w3c_api ecosystem groups --shortname=data --format=json
# Fetch groups in an ecosystem in YAML format
$ w3c_api ecosystem groups --shortname=data --format=yaml
$ w3c_api ecosystem groups --shortname=data --format=yaml
---
groups:
- href: https://api.w3.org/groups/wg/data-shapes
title: Data Shapes Working Group
- href: https://api.w3.org/groups/wg/dx
title: Dataset Exchange Working Group
- href: https://api.w3.org/groups/wg/did
title: Decentralized Identifier Working Group
- href: https://api.w3.org/groups/wg/json-ld
title: JSON-LD Working Group
# Additional groups omitted for brevity
Translations
This command provides access to W3C translations.
Index
Fetching an index of translations.
# Fetch translations
$ w3c_api translation fetch
# Fetch translations in JSON format
$ w3c_api translation fetch --format=json
# Fetch translations in YAML format
$ w3c_api translation fetch --format=yaml
$ w3c_api translation fetch --format=yaml
---
translations:
- title: 'Vidéo : introduction à l’accessibilité web et aux standards du W3C'
href: https://api.w3.org/translations/2
language: fr
- title: Vídeo de Introducción a la Accesibilidad Web y Estándares del W3C
href: https://api.w3.org/translations/3
language: es
- title: Video-introductie over Web-toegankelijkheid en W3C-standaarden
href: https://api.w3.org/translations/4
language: nl
- title: 网页无障碍和W3C标准的介绍视频
href: https://api.w3.org/translations/5
language: zh_Hans
# Additional translations omitted for brevity
Get
Getting a translation by ID.
# Fetch a translation
$ w3c_api translation fetch --id=2
# Fetch a translation in JSON format
$ w3c_api translation fetch --id=2 --format=json
# Fetch a translation in YAML format
$ w3c_api translation fetch --id=2 --format=yaml
$ w3c_api translation fetch --id=2 --format=yaml
---
uri: https://github.com/w3c/wai-video-standards-and-benefits/blob/master/index.fr.md
title: 'Vidéo : introduction à l’accessibilité web et aux standards du W3C'
language: fr
authorized: false
call_for_translation:
uri: https://www.w3.org/WAI/videos/standards-and-benefits/
title: Video Introduction to Web Accessibility and W3C Standards
comments: Needs updating. Requested on 22 Feb 2019.
states:
- review
translators:
- id: 40757
name: Stéphane Deschamps
given: Stéphane
family: Deschamps
work_title: Mr.
discr: user
biography: "I love accessibility and standards. Don't we all."
country_code: FR
city: Arcueil Cedex
_links:
self:
href: https://api.w3.org/users/56nw1z8a5uo0sscsgk4kso8g0004008
affiliations:
href: https://api.w3.org/users/56nw1z8a5uo0sscsgk4kso8g0004008/affiliations
groups:
href: https://api.w3.org/users/56nw1z8a5uo0sscsgk4kso8g0004008/groups
specifications:
href: https://api.w3.org/users/56nw1z8a5uo0sscsgk4kso8g0004008/specifications
participations:
href: https://api.w3.org/users/56nw1z8a5uo0sscsgk4kso8g0004008/participations
chair_of_groups:
href: https://api.w3.org/users/56nw1z8a5uo0sscsgk4kso8g0004008/chair-of-groups
team_contact_of_groups:
href: https://api.w3.org/users/56nw1z8a5uo0sscsgk4kso8g0004008/team-contact-of-groups
_links:
self:
href: https://api.w3.org/translations/2
Troubleshooting
This section covers common issues and their solutions.
Empty Responses from Endpoints
Some API endpoints may return empty responses or 404 errors, especially for user-related endpoints. The library is designed to handle these cases gracefully by returning empty collections rather than raising exceptions.
If a user has no specifications, the command will still complete successfully but return an empty collection:
$ w3c_api user specifications --id=128112 --format=yaml
specifications: []
User ID Format Considerations
The W3C API uses two different ID formats for users:
-
Numeric IDs (e.g.,
128112) -
String IDs (e.g.,
f1ovb5rydm8s0go04oco0cgk0sow44w)
Both formats are important to consider when interacting with the API as they may affect the results returned based on the input type.
Copyright and License
Copyright Ribose.