w3c_api 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -48,6 +48,7 @@ module W3cApi
48
48
  hal_link :latest_version, key: 'latest-version', realize_class: 'SpecVersion'
49
49
  hal_link :supersedes, key: 'supersedes', realize_class: 'SpecificationIndex', collection: true
50
50
  hal_link :series, key: 'series', realize_class: 'Serie'
51
+ hal_link :spec_versions, key: 'version-history', realize_class: 'SpecVersionIndex'
51
52
 
52
53
  key_value do
53
54
  %i[
@@ -62,6 +63,12 @@ module W3cApi
62
63
  map key.to_s.tr('_', '-'), to: key
63
64
  end
64
65
  end
66
+
67
+ def versions(client = nil)
68
+ return nil unless client
69
+
70
+ client.specification_versions(shortname)
71
+ end
65
72
  end
66
73
  end
67
74
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative 'specification'
4
+
3
5
  module W3cApi
4
6
  module Models
5
7
  # SpecificationIndex class that models `/specifications`
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'lutaml/hal'
2
4
 
3
5
  # "testimonials": {
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require_relative 'translation'
4
+
3
5
  # {
4
6
  # "page"=>1,
5
7
  # "limit"=>100,
@@ -9,7 +11,7 @@
9
11
  # "translations"=>[
10
12
  # {
11
13
  # "href"=>"https://api.w3.org/translations/2",
12
- # "title"=>"Vidéo: introduction à laccessibilité web et aux standards du W3C",
14
+ # "title"=>"Vidéo : introduction à l'accessibilité web et aux standards du W3C",
13
15
  # "language"=>"fr"
14
16
  # },
15
17
  # {
@@ -103,6 +103,18 @@ module W3cApi
103
103
  map key.to_s.tr('_', '-'), to: key
104
104
  end
105
105
  end
106
+
107
+ def groups(client = nil)
108
+ return nil unless client
109
+
110
+ client.user_groups(id)
111
+ end
112
+
113
+ def specifications(client = nil)
114
+ return nil unless client
115
+
116
+ client.user_specifications(id)
117
+ end
106
118
  end
107
119
  end
108
120
  end
@@ -2,37 +2,46 @@
2
2
 
3
3
  module W3cApi
4
4
  module Models
5
+ # Use autoload to defer class loading until first access
6
+ # This eliminates the class loading order dependency that caused
7
+ # inconsistent type names in HAL output
8
+
9
+ autoload :Account, 'w3c_api/models/account'
10
+ autoload :Affiliation, 'w3c_api/models/affiliation'
11
+ autoload :AffiliationIndex, 'w3c_api/models/affiliation_index'
12
+ autoload :CallForTranslation, 'w3c_api/models/call_for_translation'
13
+ autoload :ChairIndex, 'w3c_api/models/chair_index'
14
+ autoload :Charter, 'w3c_api/models/charter'
15
+ autoload :CharterIndex, 'w3c_api/models/charter_index'
16
+ autoload :ConnectedAccount, 'w3c_api/models/connected_account'
17
+ autoload :DelivererIndex, 'w3c_api/models/deliverer_index'
18
+ autoload :Ecosystem, 'w3c_api/models/ecosystem'
19
+ autoload :EcosystemIndex, 'w3c_api/models/ecosystem_index'
20
+ autoload :EditorIndex, 'w3c_api/models/editor_index'
21
+ autoload :EvangelistIndex, 'w3c_api/models/evangelist_index'
22
+ autoload :Extension, 'w3c_api/models/extension'
23
+ autoload :Group, 'w3c_api/models/group'
24
+ autoload :GroupIndex, 'w3c_api/models/group_index'
25
+ autoload :Groups, 'w3c_api/models/groups'
26
+ autoload :JoinEmails, 'w3c_api/models/join_emails'
27
+ autoload :ParticipantIndex, 'w3c_api/models/participant_index'
28
+ autoload :Participation, 'w3c_api/models/participation'
29
+ autoload :ParticipationIndex, 'w3c_api/models/participation_index'
30
+ autoload :Photo, 'w3c_api/models/photo'
31
+ autoload :Serie, 'w3c_api/models/serie'
32
+ autoload :SerieIndex, 'w3c_api/models/serie_index'
33
+ autoload :SpecVersion, 'w3c_api/models/spec_version'
34
+ autoload :SpecVersionIndex, 'w3c_api/models/spec_version_index'
35
+ autoload :SpecVersionPredecessorIndex, 'w3c_api/models/spec_version_predecessor_index'
36
+ autoload :SpecVersionSuccessorIndex, 'w3c_api/models/spec_version_successor_index'
37
+ autoload :SpecVersionRef, 'w3c_api/models/spec_version_ref'
38
+ autoload :Specification, 'w3c_api/models/specification'
39
+ autoload :SpecificationIndex, 'w3c_api/models/specification_index'
40
+ autoload :TeamContactIndex, 'w3c_api/models/team_contact_index'
41
+ autoload :Testimonial, 'w3c_api/models/testimonial'
42
+ autoload :Translation, 'w3c_api/models/translation'
43
+ autoload :TranslationIndex, 'w3c_api/models/translation_index'
44
+ autoload :User, 'w3c_api/models/user'
45
+ autoload :UserIndex, 'w3c_api/models/user_index'
5
46
  end
6
47
  end
7
-
8
- # Load specific model implementations
9
- require_relative 'models/affiliation'
10
- require_relative 'models/affiliation_index'
11
- require_relative 'models/call_for_translation'
12
- require_relative 'models/charter'
13
- require_relative 'models/charter_index'
14
- require_relative 'models/chair_index'
15
- require_relative 'models/connected_account'
16
- require_relative 'models/ecosystem'
17
- require_relative 'models/ecosystem_index'
18
- require_relative 'models/evangelist_index'
19
- require_relative 'models/extension'
20
- require_relative 'models/group'
21
- require_relative 'models/group_index'
22
- require_relative 'models/join_emails'
23
- require_relative 'models/participant_index'
24
- require_relative 'models/participation'
25
- require_relative 'models/participation_index'
26
- require_relative 'models/serie'
27
- require_relative 'models/serie_index'
28
- require_relative 'models/spec_version'
29
- require_relative 'models/spec_version_index'
30
- require_relative 'models/spec_version_ref'
31
- require_relative 'models/specification'
32
- require_relative 'models/specification_index'
33
- require_relative 'models/team_contact_index'
34
- require_relative 'models/testimonial'
35
- require_relative 'models/translation'
36
- require_relative 'models/translation_index'
37
- require_relative 'models/user'
38
- require_relative 'models/user_index'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module W3cApi
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: w3c_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-07-03 00:00:00.000000000 Z
11
+ date: 2025-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: lutaml-hal
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 0.1.7
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 0.1.7
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: lutaml-model
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -102,6 +102,8 @@ executables:
102
102
  extensions: []
103
103
  extra_rdoc_files: []
104
104
  files:
105
+ - ".rubocop.yml"
106
+ - ".rubocop_todo.yml"
105
107
  - LICENSE.md
106
108
  - README.adoc
107
109
  - Rakefile
@@ -116,6 +118,7 @@ files:
116
118
  - lib/w3c_api/commands/participation.rb
117
119
  - lib/w3c_api/commands/series.rb
118
120
  - lib/w3c_api/commands/specification.rb
121
+ - lib/w3c_api/commands/specification_version.rb
119
122
  - lib/w3c_api/commands/translation.rb
120
123
  - lib/w3c_api/commands/user.rb
121
124
  - lib/w3c_api/hal.rb
@@ -128,12 +131,15 @@ files:
128
131
  - lib/w3c_api/models/charter.rb
129
132
  - lib/w3c_api/models/charter_index.rb
130
133
  - lib/w3c_api/models/connected_account.rb
134
+ - lib/w3c_api/models/deliverer_index.rb
131
135
  - lib/w3c_api/models/ecosystem.rb
132
136
  - lib/w3c_api/models/ecosystem_index.rb
137
+ - lib/w3c_api/models/editor_index.rb
133
138
  - lib/w3c_api/models/evangelist_index.rb
134
139
  - lib/w3c_api/models/extension.rb
135
140
  - lib/w3c_api/models/group.rb
136
141
  - lib/w3c_api/models/group_index.rb
142
+ - lib/w3c_api/models/groups.rb
137
143
  - lib/w3c_api/models/join_emails.rb
138
144
  - lib/w3c_api/models/participant_index.rb
139
145
  - lib/w3c_api/models/participation.rb
@@ -143,7 +149,9 @@ files:
143
149
  - lib/w3c_api/models/serie_index.rb
144
150
  - lib/w3c_api/models/spec_version.rb
145
151
  - lib/w3c_api/models/spec_version_index.rb
152
+ - lib/w3c_api/models/spec_version_predecessor_index.rb
146
153
  - lib/w3c_api/models/spec_version_ref.rb
154
+ - lib/w3c_api/models/spec_version_successor_index.rb
147
155
  - lib/w3c_api/models/specification.rb
148
156
  - lib/w3c_api/models/specification_index.rb
149
157
  - lib/w3c_api/models/team_contact_index.rb