Class: W3cApi::Commands::Group
- Inherits:
-
Thor
- Object
- Thor
- W3cApi::Commands::Group
- Includes:
- OutputFormatter, UserAgentOption
- Defined in:
- lib/w3c_api/commands/group.rb
Overview
Thor CLI command for group operations
Instance Method Summary collapse
- #chairs ⇒ Object
- #charters ⇒ Object
- #fetch ⇒ Object
- #participations ⇒ Object
- #specifications ⇒ Object
- #team_contacts ⇒ Object
- #users ⇒ Object
Methods included from UserAgentOption
Methods included from OutputFormatter
Instance Method Details
#chairs ⇒ Object
69 70 71 72 73 |
# File 'lib/w3c_api/commands/group.rb', line 69 def chairs client = W3cApi::Client.new chairs = client.group_chairs([:id]) output_results(chairs, [:format]) end |
#charters ⇒ Object
59 60 61 62 63 |
# File 'lib/w3c_api/commands/group.rb', line 59 def charters client = W3cApi::Client.new charters = client.group_charters([:id]) output_results(charters, [:format]) end |
#fetch ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/w3c_api/commands/group.rb', line 20 def fetch client = W3cApi::Client.new groups = if [:id] # Single group client.group([:id]) elsif [:type] client.groups(type: [:type]) else client.groups end output_results(groups, [:format]) end |
#participations ⇒ Object
89 90 91 92 93 |
# File 'lib/w3c_api/commands/group.rb', line 89 def participations client = W3cApi::Client.new participations = client.group_participations([:id]) output_results(participations, [:format]) end |
#specifications ⇒ Object
49 50 51 52 53 |
# File 'lib/w3c_api/commands/group.rb', line 49 def specifications client = W3cApi::Client.new specifications = client.group_specifications([:id]) output_results(specifications, [:format]) end |