Class: W3cApi::Commands::Participation

Inherits:
Thor
  • Object
show all
Includes:
OutputFormatter
Defined in:
lib/w3c_api/commands/participation.rb

Overview

Thor CLI command for participation operations

Instance Method Summary collapse

Methods included from OutputFormatter

#output_results

Instance Method Details

#fetchObject



17
18
19
20
21
# File 'lib/w3c_api/commands/participation.rb', line 17

def fetch
  client = W3cApi::Client.new
  participation = client.participation(options[:id])
  output_results(participation, options[:format])
end

#participantsObject



27
28
29
30
31
# File 'lib/w3c_api/commands/participation.rb', line 27

def participants
  client = W3cApi::Client.new
  participants = client.participation_participants(options[:id])
  output_results(participants, options[:format])
end