class PassiveTotal::Client::Account

Public Instance Methods

classifications(classification) click to toggle source

Retrieve items with the specified classification. api.passivetotal.org/api/docs/#api-Account-GetV2AccountClassifications

@param [String] classification classification for which to retrieve items for

@return [Hash]

# File lib/passivetotal/clients/account.rb, line 112
def classifications(classification)
  params = {
    classification: classification
  }.compact

  _get("/account/classifications", params) { |json| json }
end
get() click to toggle source

Read current account metadata and settings. api.passivetotal.org/api/docs/#api-Account-GetV2Account

@return [Hash]

# File lib/passivetotal/clients/account.rb, line 13
def get
  _get("/account") { |json| json }
end
history(source = nil) click to toggle source

Read API usage history of the account. api.passivetotal.org/api/docs/#api-Account-GetV2AccountHistory

@param [String, nil] source history type (api/ui), defaults to both

@return [Hash]

# File lib/passivetotal/clients/account.rb, line 25
def history(source = nil)
  params = {
    source: source
  }.compact

  _get("/account/history", params) { |json| json }
end
monitors() click to toggle source

Get active monitors api.passivetotal.org/api/docs/#api-Account-GetV2AccountMonitors

@return [Hash]

# File lib/passivetotal/clients/account.rb, line 40
def monitors
  _get("/account/monitors") { |json| json }
end
organization() click to toggle source

Read current organization metadata api.passivetotal.org/api/docs/#api-Account-GetV2AccountOrganization

@return [Hash]

# File lib/passivetotal/clients/account.rb, line 51
def organization
  _get("/account/organization") { |json| json }
end
quotas() click to toggle source

Read current account and organization quotas. api.passivetotal.org/api/docs/#api-Account-GetV2AccountQuotas

@return [Hash]

# File lib/passivetotal/clients/account.rb, line 62
def quotas
  _get("/account/quota") { |json| json }
end
sources(source: nil) click to toggle source

Check sources being used for queries. api.passivetotal.org/api/docs/#api-Account-GetV2AccountSources

@param [String, nil] source the source to filter on

@return [Hash]

# 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) click to toggle source

Read team activity. api.passivetotal.org/api/docs/#api-Account-GetV2AccountOrganizationTeamstream

@param [String, nil] source filter to this source @param [String, nil] dt filter to this datetime @param [String, nil] type filter by type field @param [String, nil] focus filter by focus (domain, ip, etc)

@return [Hash]

# 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