Sha256: 01f2ff3077170f6e6029f693dd83eb8b134ea19e996ca7f4905e08f83863419e
Contents?: true
Size: 554 Bytes
Versions: 6
Compression:
Stored size: 554 Bytes
Contents
#!/usr/bin/env ruby require 'pry' require 'dotenv' Dotenv.load ".env.development", '.env' account = ENV['PAGERDUTY_ACCOUNT'] || raise("Missing ENV['PAGERDUTY_ACCOUNT'], add to .env.development") token = ENV['PAGERDUTY_TOKEN'] || raise("Missing ENV['PAGERDUTY_TOKEN'], add to .env.development") require 'pager_duty/connection' $pagerduty = PagerDuty::Connection.new(account, token) # http://developer.pagerduty.com/documentation/rest/users/list response = $pagerduty.get('users') response.users.each do |user| puts "#{user.name}: #{user.email}" end
Version data entries
6 entries across 6 versions & 1 rubygems