@@ -143,7 +143,7 @@ $sparky = new SparkPost($httpClient, ['key'=>'YOUR_API_KEY']);
143143* ` uri `
144144 * Required: Yes
145145 * Type: ` String `
146- * The URI to recieve the request
146+ * The URI to receive the request
147147* ` payload `
148148 * Required: No
149149 * Type: ` Array `
@@ -177,11 +177,11 @@ Sends an asynchronous request to the SparkPost API and returns a `SparkPostPromi
177177 * ` payload.cc `
178178 * Required: No
179179 * Type: ` Array `
180- * Recipients to recieve a carbon copy of the transmission
180+ * Recipients to receive a carbon copy of the transmission
181181 * ` payload.bcc `
182182 * Required: No
183183 * Type: ` Array `
184- * Recipients to descreetly recieve a carbon copy of the transmission
184+ * Recipients to discreetly receive a carbon copy of the transmission
185185
186186## Examples
187187
@@ -196,9 +196,8 @@ use Http\Adapter\Guzzle6\Client as GuzzleAdapter;
196196
197197$httpClient = new GuzzleAdapter(new Client());
198198// Good practice to not have API key literals in code - set an environment variable instead
199- $sparky = new SparkPost($httpClient, ['key' => getenv('SPARKPOST_API_KEY')]);
200199// For simple example, use synchronous model
201- $sparky->setOptions([ 'async' => false]);
200+ $sparky = new SparkPost($httpClient, ['key' => getenv('SPARKPOST_API_KEY'), 'async' => false]);
202201
203202try {
204203 $response = $sparky->transmissions->post([
@@ -299,7 +298,7 @@ The API calls either return a `SparkPostPromise` or `SparkPostResponse` dependin
299298``` php
300299$sparky->setOptions(['async' => false]);
301300try {
302- $response = $sparky->transmissions->get(); //TODO: Change this. Transmissions no longer supports GET call
301+ $response = $sparky->transmissions->get();
303302
304303 echo $response->getStatusCode()."\n";
305304 print_r($response->getBody())."\n";
@@ -314,7 +313,8 @@ catch (\Exception $e) {
314313Asynchronous an be handled in two ways: by passing callbacks or waiting for the promise to be fulfilled. Waiting acts like synchronous request.
315314##### Wait (Synchronous)
316315``` php
317- $promise = $sparky->transmissions->get(); //TODO: Change this. Transmissions no longer supports GET call
316+
317+ $promise = // YOUR API CALL GOES HERE
318318
319319try {
320320 $response = $promise->wait();
@@ -330,7 +330,7 @@ echo "I will print out after the promise is fulfilled";
330330
331331##### Then (Asynchronous)
332332``` php
333- $promise = $sparky->transmissions->get(); //TODO: Change this. Transmissions no longer supports GET call
333+ $promise = // YOUR API CALL GOES HERE
334334
335335$promise->then(
336336 // Success callback
0 commit comments