Class: W3cApi::Commands::User
- Inherits:
-
Thor
- Object
- Thor
- W3cApi::Commands::User
- Includes:
- OutputFormatter, UserAgentOption
- Defined in:
- lib/w3c_api/commands/user.rb
Overview
Thor CLI command for user operations
Instance Method Summary collapse
- #affiliations ⇒ Object
- #chair_of_groups ⇒ Object
- #fetch ⇒ Object
- #groups ⇒ Object
- #participations ⇒ Object
- #specifications ⇒ Object
- #team_contact_of_groups ⇒ Object
Methods included from UserAgentOption
Methods included from OutputFormatter
Instance Method Details
#affiliations ⇒ Object
51 52 53 54 55 |
# File 'lib/w3c_api/commands/user.rb', line 51 def affiliations client = W3cApi::Client.new affiliations = client.user_affiliations([:id]) output_results(affiliations, [:format]) end |
#chair_of_groups ⇒ Object
73 74 75 76 77 |
# File 'lib/w3c_api/commands/user.rb', line 73 def chair_of_groups client = W3cApi::Client.new groups = client.user_chair_of_groups([:id]) output_results(groups, [:format]) end |
#fetch ⇒ Object
19 20 21 22 23 |
# File 'lib/w3c_api/commands/user.rb', line 19 def fetch client = W3cApi::Client.new user = client.user([:id]) output_results(user, [:format]) end |
#groups ⇒ Object
29 30 31 32 33 |
# File 'lib/w3c_api/commands/user.rb', line 29 def groups client = W3cApi::Client.new groups = client.user_groups([:id]) output_results(groups, [:format]) end |
#participations ⇒ Object
62 63 64 65 66 |
# File 'lib/w3c_api/commands/user.rb', line 62 def participations client = W3cApi::Client.new participations = client.user_participations([:id]) output_results(participations, [:format]) end |
#specifications ⇒ Object
40 41 42 43 44 |
# File 'lib/w3c_api/commands/user.rb', line 40 def specifications client = W3cApi::Client.new specifications = client.user_specifications([:id]) output_results(specifications, [:format]) end |
#team_contact_of_groups ⇒ Object
84 85 86 87 88 |
# File 'lib/w3c_api/commands/user.rb', line 84 def team_contact_of_groups client = W3cApi::Client.new groups = client.user_team_contact_of_groups([:id]) output_results(groups, [:format]) end |