Skip to content

Commit 7d2668c

Browse files
author
Zack Schwartz
committed
check if user forgets to put API key in example
1 parent 264fa40 commit 7d2668c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Api2Pdf.Examples/Program.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,15 @@ namespace Api2Pdf.Examples
55
{
66
class Program
77
{
8-
public const string API_KEY = "YOUR-API-KEY";
8+
public const string API_KEY = "";
99
static void Main(string[] args)
1010
{
11+
if (string.IsNullOrEmpty(API_KEY))
12+
{
13+
Console.WriteLine("Set API Key variable before running script");
14+
return;
15+
}
16+
1117
Console.WriteLine("Starting up...");
1218

1319
var a2pClient = new Api2Pdf(API_KEY);

0 commit comments

Comments
 (0)