pastebinner/bin/console

24 lines
665 B
Ruby
Executable file

#!/usr/bin/env ruby
require 'bundler/setup'
require 'pastebinner'
require 'pry'
# setup restclient log to the console
# make it into a method to toggle on or off
def rest_client_toggle_log(default=false)
if default
RestClient.log = 'stdout'
end
end
Pastebinner.configure do |config|
config.api_key = ENV['pastebin_api_key']
config.api_username = ENV['pastebin_username']
config.api_password = ENV['pastebin_password']
end
pb = Pastebinner::ApiClient.new(Pastebinner.configuration.api_key, Pastebinner.configuration.api_username, Pastebinner.configuration.api_password)
# you should have a pb object to work with now, have fun in pry!
binding.pry