Skip to content

Commit

Permalink
index on master: 240b8db Merge pull request #57 from yob/ruby-version
Browse files Browse the repository at this point in the history
  • Loading branch information
henrys-cm committed Aug 16, 2024
1 parent 240b8db commit 00e5c33
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions samples/clients_sample.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@

class ClientsSample
def initialize
raise 'CREATESEND_ACCESS_TOKEN env var missing' if ENV['CREATESEND_ACCESS_TOKEN'].nil?
raise 'CREATESEND_REFRESH_TOKEN env var missing' if ENV['CREATESEND_REFRESH_TOKEN'].nil?
raise 'CREATESEND_CLIENT_ID env var missing' if ENV['CREATESEND_CLIENT_ID'].nil?
# raise 'CREATESEND_ACCESS_TOKEN env var missing' if ENV['CREATESEND_ACCESS_TOKEN'].nil?
# raise 'CREATESEND_REFRESH_TOKEN env var missing' if ENV['CREATESEND_REFRESH_TOKEN'].nil?
# raise 'CREATESEND_CLIENT_ID env var missing' if ENV['CREATESEND_CLIENT_ID'].nil?

# auth = auth = {:access_token => ENV['CREATESEND_ACCESS_TOKEN'], :refresh_token => ENV['CREATESEND_REFRESH_TOKEN']}

raise 'CREATESEND_API_KEY env var missing' if ENV['CREATESEND_API_KEY'].nil?
raise 'CREATESEND_LIST_ID env var missing' if ENV['CREATESEND_LIST_ID'].nil?
@auth = {:api_key => ENV['CREATESEND_API_KEY']}

auth = auth = {:access_token => ENV['CREATESEND_ACCESS_TOKEN'], :refresh_token => ENV['CREATESEND_REFRESH_TOKEN']}
@client = CreateSend::Client.new auth, ENV['CREATESEND_CLIENT_ID']
end

Expand Down

0 comments on commit 00e5c33

Please sign in to comment.