diff options
| author | mokha <mokha@cisco.com> | 2018-03-17 18:27:23 -0600 |
|---|---|---|
| committer | mokha <mokha@cisco.com> | 2018-03-17 18:27:23 -0600 |
| commit | cb73177dc77f925fa81297f7074bebbbb130161a (patch) | |
| tree | f0bffbfa0fbfa7ab5ba1be8fc9cb1be3e2a595fe /lib | |
| parent | 8688813e5fe309e638781c455a9827e9375fe902 (diff) | |
add users organization command.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/ats/cli/threat_grid/users.rb | 4 | ||||
| -rw-r--r-- | lib/ats/cli/threatgrid.rb | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/ats/cli/threat_grid/users.rb b/lib/ats/cli/threat_grid/users.rb index 96dc62e..ee49ea5 100644 --- a/lib/ats/cli/threat_grid/users.rb +++ b/lib/ats/cli/threat_grid/users.rb @@ -12,6 +12,10 @@ module ATS api.get("users/#{login}") end + def organization(login) + api.get("users/#{login}/organization") + end + def activity(login) api.get("users/#{login}/activity") end diff --git a/lib/ats/cli/threatgrid.rb b/lib/ats/cli/threatgrid.rb index 2634c68..9bcef46 100644 --- a/lib/ats/cli/threatgrid.rb +++ b/lib/ats/cli/threatgrid.rb @@ -14,6 +14,11 @@ module ATS say JSON.pretty_generate(api.users.show(login)) end + desc 'organization <login>', 'organization' + def organization(login) + say JSON.pretty_generate(api.users.organization(login)) + end + desc 'activity <login>', 'activity' def activity(login) say JSON.pretty_generate(api.users.activity(login)) |
