module Resource::Tokens

Namespace for tokens resource.

Public Instance Methods

token_download(export_uuid) click to toggle source

Check the download of a export request @param [String] export_uuid The export uuid string. @return [JSON] (@see format) @example Download a ready export.

export = nc.export_download( '73376c41-1508-46b7-8587-483d159cd956')
open("scan_report", "wb") do |file|
  file.write( export )
end
# File lib/modules/tokens.rb, line 23
def token_download(export_uuid)
  request.get({ path: "/tokens/#{export_uuid}/download", headers: headers })
end
token_status(export_uuid) click to toggle source

Check the status of a export request @param [String] export_uuid The export uuid string. @return [JSON] @example Checking the status of a export.

export_status = nc.export_status( "73376c41-1508-46b7-8587-483d159cd956" )
return true if export_status["status"] == "ready"
# File lib/modules/tokens.rb, line 11
def token_status(export_uuid)
  request.get({ path: "/tokens/#{export_uuid}/status", headers: headers })
end