Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions examples/events-to-csv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@
end
end.parse!

counter = 0
limit = options[:limit] || 1000

# Fetch the events
client = OneLogin::Api::Client.new(
client_id: 'ONELOGIN_CLIENT_ID_GOES_HERE',
client_secret: 'ONELOGIN_CLIENT_SECRET_GOES_HERE',
region: 'us'
region: 'us',
max_results: limit
)

attribute_names = ['id', 'created_at', 'account_id', 'user_id', 'user_name', 'event_type_id',
Expand All @@ -66,9 +70,6 @@
'operation_name', 'directory_sync_run_id', 'directory_id', 'resolution', 'client_id',
'resource_type_id', 'error_description', 'risk_score', 'risk_reasons', 'risk_cookie_id', 'browser_fingerprint']

counter = 0
limit = options[:limit] || 1000

# We remove limit from options parsed to the api as we want to fetch
# the max number of records possible and then use the cursor that is
# built into the ruby sdk to limit the results
Expand Down