Class: PassiveTotal::Client::Account
- Defined in:
- lib/passivetotal/clients/account.rb
Constant Summary
Constants inherited from Base
Base::BASE_URL, Base::HOST, Base::VERSION
Instance Method Summary collapse
-
#classifications(classification) ⇒ Hash
Retrieve items with the specified classification.
-
#get ⇒ Hash
Read current account metadata and settings.
-
#history(source = nil) ⇒ Hash
Read API usage history of the account.
-
#monitors ⇒ Hash
Get active monitors api.passivetotal.org/api/docs/#api-Account-GetV2AccountMonitors.
-
#organization ⇒ Hash
Read current organization metadata api.passivetotal.org/api/docs/#api-Account-GetV2AccountOrganization.
-
#quotas ⇒ Hash
Read current account and organization quotas.
-
#sources(source: nil) ⇒ Hash
Check sources being used for queries.
-
#teamstream(source: nil, dt: nil, type: nil, focus: nil) ⇒ Hash
Read team activity.
Methods inherited from Base
Constructor Details
This class inherits a constructor from PassiveTotal::Client::Base
Instance Method Details
#classifications(classification) ⇒ Hash
Retrieve items with the specified classification. api.passivetotal.org/api/docs/#api-Account-GetV2AccountClassifications
112 113 114 115 116 117 118 |
# File 'lib/passivetotal/clients/account.rb', line 112 def classifications(classification) params = { classification: classification }.compact _get("/account/classifications", params) { |json| json } end |
#get ⇒ Hash
Read current account metadata and settings. api.passivetotal.org/api/docs/#api-Account-GetV2Account
13 14 15 |
# File 'lib/passivetotal/clients/account.rb', line 13 def get _get("/account") { |json| json } end |
#history(source = nil) ⇒ Hash
Read API usage history of the account. api.passivetotal.org/api/docs/#api-Account-GetV2AccountHistory
25 26 27 28 29 30 31 |
# File 'lib/passivetotal/clients/account.rb', line 25 def history(source = nil) params = { source: source }.compact _get("/account/history", params) { |json| json } end |
#monitors ⇒ Hash
Get active monitors api.passivetotal.org/api/docs/#api-Account-GetV2AccountMonitors
40 41 42 |
# File 'lib/passivetotal/clients/account.rb', line 40 def monitors _get("/account/monitors") { |json| json } end |
#organization ⇒ Hash
Read current organization metadata api.passivetotal.org/api/docs/#api-Account-GetV2AccountOrganization
51 52 53 |
# File 'lib/passivetotal/clients/account.rb', line 51 def organization _get("/account/organization") { |json| json } end |
#quotas ⇒ Hash
Read current account and organization quotas. api.passivetotal.org/api/docs/#api-Account-GetV2AccountQuotas
62 63 64 |
# File 'lib/passivetotal/clients/account.rb', line 62 def quotas _get("/account/quota") { |json| json } end |
#sources(source: nil) ⇒ Hash
Check sources being used for queries. api.passivetotal.org/api/docs/#api-Account-GetV2AccountSources
74 75 76 77 78 79 80 |
# File 'lib/passivetotal/clients/account.rb', line 74 def sources(source: nil) params = { source: source }.compact _get("/account/sources", params) { |json| json } end |
#teamstream(source: nil, dt: nil, type: nil, focus: nil) ⇒ Hash
Read team activity. api.passivetotal.org/api/docs/#api-Account-GetV2AccountOrganizationTeamstream
93 94 95 96 97 98 99 100 101 102 |
# File 'lib/passivetotal/clients/account.rb', line 93 def teamstream(source: nil, dt: nil, type: nil, focus: nil) params = { source: source, dt: dt, type: type, focus: focus, }.compact _get("/account/organization/teamstream", params) { |json| json } end |