Module: W3cApi::Embed
- Defined in:
- lib/w3c_api/embed.rb
Overview
Module for discovering and working with embed-supported endpoints
Class Method Summary collapse
-
.embed_info ⇒ Object
Get comprehensive embed information.
-
.endpoint_descriptions ⇒ Object
Get human-readable descriptions of embed-supported endpoints.
-
.supported_endpoints ⇒ Object
Get list of endpoints that support embed parameter.
-
.supports_embed?(endpoint_id) ⇒ Boolean
Check if a specific endpoint supports embed.
Class Method Details
.embed_info ⇒ Object
Get comprehensive embed information
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/w3c_api/embed.rb', line 27 def { supported_endpoints: supported_endpoints, descriptions: endpoint_descriptions, usage_example: { discovery: "W3cApi::Client.embed_supported_endpoints", usage: "W3cApi::Client.new.specifications(embed: true, items: 2)", automatic_realization: "spec_link.realize # Uses embedded content automatically", }, } end |
.endpoint_descriptions ⇒ Object
Get human-readable descriptions of embed-supported endpoints
18 19 20 21 22 23 24 |
# File 'lib/w3c_api/embed.rb', line 18 def endpoint_descriptions { specification_index: "Specifications index with embedded specification details", group_index: "Groups index with embedded group details", serie_index: "Series index with embedded series details", } end |
.supported_endpoints ⇒ Object
Get list of endpoints that support embed parameter
8 9 10 |
# File 'lib/w3c_api/embed.rb', line 8 def supported_endpoints W3cApi::Client. end |
.supports_embed?(endpoint_id) ⇒ Boolean
Check if a specific endpoint supports embed
13 14 15 |
# File 'lib/w3c_api/embed.rb', line 13 def (endpoint_id) supported_endpoints.include?(endpoint_id.to_sym) end |