Skip to content

Commit fc1ee14

Browse files
author
Rich Leland
committed
Fix typos, update language in examples
1 parent 599ce46 commit fc1ee14

10 files changed

+47
-47
lines changed

examples/transmission/delete_transmission.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
$sparky = new SparkPost($httpAdapter, ['key'=>$config['api-key']]);
1515

1616
try {
17-
$results = $sparky->transmission->delete('transmission-id');
18-
echo 'Transmission deleted!';
17+
$results = $sparky->transmission->delete('transmission-id');
18+
echo 'Transmission deleted!';
1919
} catch (\Exception $exception) {
20-
echo $exception->getMessage();
20+
echo $exception->getMessage();
2121
}
2222
?>

examples/transmission/get_all_transmissions.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
$sparky = new SparkPost($httpAdapter, ['key'=>$config['api-key']]);
1515

1616
try {
17-
$results = $sparky->transmission->all();
18-
echo 'Congrats you can use your SDK!';
17+
$results = $sparky->transmission->all();
18+
echo 'Congrats! You got a list of all your transmissions from SparkPost!';
1919
} catch (\Exception $exception) {
20-
echo $exception->getMessage();
20+
echo $exception->getMessage();
2121
}
2222
?>

examples/transmission/get_transmission.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
$sparky = new SparkPost($httpAdapter, ['key'=>$config['api-key']]);
1515

1616
try {
17-
$results = $sparky->transmission->find('Your Transmission ID');
18-
echo 'Congrats you can use your SDK!';
17+
$results = $sparky->transmission->find('Your Transmission ID');
18+
echo 'Congrats! You retrieved your transmission from SparkPost!';
1919
} catch (\Exception $exception) {
20-
echo $exception->getMessage();
20+
echo $exception->getMessage();
2121
}
2222
?>

examples/transmission/rfc822.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
$sparky = new SparkPost($httpAdapter, ['key'=>$config['api-key']]);
1515

1616
try {
17-
$results = $sparky->transmission->send([
18-
'recipients'=>[
19-
[
20-
'address'=>[
21-
'email'=>'[email protected]'
22-
]
23-
]
24-
],
25-
'rfc822'=>'Content-Type: text/plain\nFrom: From Envelope <[email protected]>\nSubject: Example Email\n\nHello World'
26-
]);
27-
echo 'Congrats you can use your SDK!';
17+
$results = $sparky->transmission->send([
18+
'recipients'=>[
19+
[
20+
'address'=>[
21+
'email'=>'[email protected]'
22+
]
23+
]
24+
],
25+
'rfc822'=>'Content-Type: text/plain\nFrom: From Envelope <[email protected]>\nSubject: Example Email\n\nHello World'
26+
]);
27+
echo 'Congrats! You sent an email using SparkPost!';
2828
} catch (\Exception $exception) {
29-
echo $exception->getMessage();
29+
echo $exception->getMessage();
3030
}
3131
?>

examples/transmission/send_transmission_all_fields.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
'startTime'=>'2016-03-17T08:00:00-04:00',
3939
'from'=>[
4040
'name' => 'From Envelope',
41-
'email' => '[email protected]>'
41+
'email' => '[email protected]'
4242
],
4343
'html'=>'<p>Hello World! Your name is: {{name}}</p>',
4444
'text'=>'Hello World!',
@@ -59,7 +59,7 @@
5959
]
6060
]);
6161

62-
echo 'Congrats you can use your SDK!';
62+
echo 'Congrats! You sent an email using SparkPost!';
6363
} catch (\Exception $exception) {
6464
echo $exception->getMessage();
6565
}

examples/transmission/simple_send.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
$results = $sparky->transmission->send([
1818
'from'=>[
1919
'name' => 'From Envelope',
20-
'email' => '[email protected]>'
20+
'email' => '[email protected]'
2121
],
2222
'html'=>'<p>Hello World!</p>',
2323
'text'=>'Hello World!',
@@ -30,7 +30,7 @@
3030
]
3131
]
3232
]);
33-
echo 'Congrats you can use your SDK!';
33+
echo 'Congrats! You sent an email using SparkPost!';
3434
} catch (\Exception $exception) {
3535
echo $exception->getMessage();
3636
}

examples/transmission/stored_recipients_inline_content.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
'campaign'=>'my-campaign',
2020
'from'=>[
2121
'name' => 'From Envelope',
22-
'email' => '[email protected]>'
22+
'email' => '[email protected]'
2323
],
2424
'html'=>'<p>Hello World! Your name is: {{name}}</p>',
2525
'text'=>'Hello World!',
2626
'subject'=>'Example Email: {{name}}',
2727
'recipientList'=>'Example List'
2828
]);
2929

30-
echo 'Congrats you can use your SDK!';
30+
echo 'Congrats! You sent an email using SparkPost!';
3131
} catch (\Exception $exception) {
3232
echo $exception->getMessage();
3333
}

examples/transmission/stored_template_send.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
$results = $sparky->transmission->send([
1818
'from'=>[
1919
'name' => 'From Envelope',
20-
'email' => '[email protected]>'
20+
'email' => '[email protected]'
2121
],
2222
'recipients'=>[
2323
[
@@ -28,7 +28,7 @@
2828
],
2929
'template'=>'my-first-email'
3030
]);
31-
echo 'Congrats you can use your SDK!';
31+
echo 'Congrats! You sent an email using SparkPost!';
3232
} catch (\Exception $exception) {
3333
echo $exception->getMessage();
3434
}

examples/unwrapped/create_template.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
$sparky = new SparkPost($httpAdapter, ['key'=>$config['api-key']]);
1515

1616
try {
17-
// define the endpoint
18-
$sparky->setupUnwrapped('templates');
17+
// define the endpoint
18+
$sparky->setupUnwrapped('templates');
1919

20-
$templateConfig = [
21-
'name' => 'Summer Sale!',
22-
'id'=>'summer-sale',
23-
'content'=> [
24-
'from' => '[email protected]',
25-
'subject' => 'Summer deals',
26-
'html' => '<b>Check out these deals!</b>'
27-
]
28-
];
29-
$results = $sparky->templates->create($templateConfig);
30-
echo 'Congrats you can use your SDK!';
20+
$templateConfig = [
21+
'name' => 'Summer Sale!',
22+
'id'=>'summer-sale',
23+
'content'=> [
24+
'from' => '[email protected]',
25+
'subject' => 'Summer deals',
26+
'html' => '<b>Check out these deals!</b>'
27+
]
28+
];
29+
$results = $sparky->templates->create($templateConfig);
30+
echo 'Congrats! You created a template using SparkPost!';
3131
} catch (\Exception $exception) {
32-
echo $exception->getMessage();
32+
echo $exception->getMessage();
3333
}
3434
?>

examples/unwrapped/get_webhooks.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
$sparky = new SparkPost($httpAdapter, ['key'=>$config['api-key']]);
1515

1616
try {
17-
$sparky->setupUnwrapped('webhooks');
17+
$sparky->setupUnwrapped('webhooks');
1818

19-
$results = $sparky->webhooks->get();
19+
$results = $sparky->webhooks->get();
2020

21-
echo 'Congrats you can use your SDK!';
21+
echo 'Congrats! You got a list of all your webhooks from SparkPost!';
2222
} catch (\Exception $exception) {
23-
echo $exception->getMessage();
23+
echo $exception->getMessage();
2424
}
2525
?>

0 commit comments

Comments
 (0)