Skip to content

Commit 551d77e

Browse files
committed
Remove all references to Secret and ApiKey (Issue #34)
1 parent 5050730 commit 551d77e

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

examples/conversions_chaining.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 'tmpdir'
33

44
ConvertApi.configure do |config|
5-
config.api_credentials = ENV['CONVERT_API_SECRET'] # your api secret or token
5+
config.api_credentials = ENV['API_TOKEN'] # your api token
66
end
77

88
# Short example of conversions chaining, the PDF pages extracted and saved as separated JPGs and then ZIP'ed
@@ -20,4 +20,4 @@
2020

2121
saved_files = zip_result.save_files(Dir.tmpdir)
2222

23-
puts "File saved to #{saved_files}"
23+
puts "File saved to #{saved_files}"

examples/convert_stream.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 'tmpdir'
33

44
ConvertApi.configure do |config|
5-
config.api_credentials = ENV['CONVERT_API_SECRET'] # your api secret or token
5+
config.api_credentials = ENV['API_TOKEN'] # your api token
66
end
77

88
# Example of converting text to PDF
@@ -21,4 +21,4 @@
2121
.convert('pdf', {File: upload_io})
2222
.save_files(Dir.tmpdir)
2323

24-
puts "The PDF saved to: #{saved_files}"
24+
puts "The PDF saved to: #{saved_files}"

examples/convert_url_to_pdf.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 'tmpdir'
33

44
ConvertApi.configure do |config|
5-
config.api_credentials = ENV['CONVERT_API_SECRET'] # your api secret or token
5+
config.api_credentials = ENV['API_TOKEN'] # your api token
66
end
77

88
# Example of converting Web Page URL to PDF file
@@ -20,4 +20,4 @@
2020

2121
saved_files = result.save_files(Dir.tmpdir)
2222

23-
puts "The web page PDF saved to #{saved_files}"
23+
puts "The web page PDF saved to #{saved_files}"

examples/convert_word_to_pdf_and_png.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 'tmpdir'
33

44
ConvertApi.configure do |config|
5-
config.api_credentials = ENV['CONVERT_API_SECRET'] # your api secret or token
5+
config.api_credentials = ENV['API_TOKEN'] # your api token
66
end
77

88
# Example of saving Word docx to PDF and to PNG
@@ -23,4 +23,4 @@
2323
.convert('png', File: upload_io)
2424
.save_files(Dir.tmpdir)
2525

26-
puts "The PNG saved to: #{saved_files}"
26+
puts "The PNG saved to: #{saved_files}"

examples/create_pdf_thumbnail.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 'tmpdir'
33

44
ConvertApi.configure do |config|
5-
config.api_credentials = ENV['CONVERT_API_SECRET'] # your api secret or token
5+
config.api_credentials = ENV['API_TOKEN'] # your api token
66
end
77

88
# Example of extracting first page from PDF and then chaining conversion PDF page to JPG.
@@ -26,4 +26,4 @@
2626

2727
saved_files = jpg_result.save_files(Dir.tmpdir)
2828

29-
puts "The thumbnail saved to #{saved_files}"
29+
puts "The thumbnail saved to #{saved_files}"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
require 'convert_api'
22

33
ConvertApi.configure do |config|
4-
config.api_credentials = ENV['CONVERT_API_SECRET'] # your api secret or token
4+
config.api_credentials = ENV['API_TOKEN'] # your api token
55
end
66

77
# Retrieve user information
88
# https://www.convertapi.com/doc/user
99

10-
puts ConvertApi.user
10+
puts ConvertApi.user

examples/split_and_merge_pdf.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require 'tmpdir'
33

44
ConvertApi.configure do |config|
5-
config.api_credentials = ENV['CONVERT_API_SECRET'] # your api secret or token
5+
config.api_credentials = ENV['API_TOKEN'] # your api token
66
end
77

88
# Example of extracting first and last pages from PDF and then merging them back to new PDF.
@@ -17,4 +17,4 @@
1717

1818
saved_files = merge_result.save_files(Dir.tmpdir)
1919

20-
puts "The PDF saved to #{saved_files}"
20+
puts "The PDF saved to #{saved_files}"

0 commit comments

Comments
 (0)