Class: W3cApi::Commands::Affiliation
- Inherits:
-
Thor
- Object
- Thor
- W3cApi::Commands::Affiliation
- Includes:
- OutputFormatter
- Defined in:
- lib/w3c_api/commands/affiliation.rb
Overview
Thor CLI command for affiliation operations
Instance Method Summary collapse
Methods included from OutputFormatter
Instance Method Details
#fetch ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/w3c_api/commands/affiliation.rb', line 17 def fetch client = W3cApi::Client.new affiliations = if [:id] # Single affiliation client.affiliation([:id]) else client.affiliations end output_results(affiliations, [:format]) end |
#participants ⇒ Object
34 35 36 37 38 |
# File 'lib/w3c_api/commands/affiliation.rb', line 34 def participants client = W3cApi::Client.new participants = client.affiliation_participants([:id]) output_results(participants, [:format]) end |
#participations ⇒ Object
44 45 46 47 48 |
# File 'lib/w3c_api/commands/affiliation.rb', line 44 def participations client = W3cApi::Client.new participations = client.affiliation_participations([:id]) output_results(participations, [:format]) end |