diff options
author | Elmer Thomas <elmer@thinkingserious.com> | 2016-03-20 15:30:00 -0700 |
---|---|---|
committer | Elmer Thomas <elmer@thinkingserious.com> | 2016-03-20 15:30:00 -0700 |
commit | 65e2ee0cca1577bd8438115fe4f8293d6ac95ec8 (patch) | |
tree | 97d8e5fc4a7543560476b76af26c8ff671bf30a8 /examples/example.php | |
parent | 87cf790028f26c9a9c24eb57ea1db5bab8900034 (diff) | |
download | php-http-client-65e2ee0cca1577bd8438115fe4f8293d6ac95ec8.zip php-http-client-65e2ee0cca1577bd8438115fe4f8293d6ac95ec8.tar.gz php-http-client-65e2ee0cca1577bd8438115fe4f8293d6ac95ec8.tar.bz2 |
Preparing for public release
Diffstat (limited to 'examples/example.php')
-rw-r--r-- | examples/example.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/example.php b/examples/example.php index 590382b..3a90c69 100644 --- a/examples/example.php +++ b/examples/example.php @@ -9,7 +9,7 @@ $headers = array( ); $client = new SendGrid\Client('https://e9sk3d3bfaikbpdq7.stoplight-proxy.io', $headers, '/v3', null); -# GET Collection +// GET Collection $query_params = array('limit' => 100, 'offset' => 0); $request_headers = array('X-Mock: 200'); $response = $client->api_keys()->get(null, $query_params, $request_headers); @@ -17,7 +17,7 @@ echo $response->statusCode(); echo $response->responseBody(); echo $response->responseHeaders(); -# POST +// POST $request_body = array( 'name' => 'My PHP API Key', 'scopes' => array( @@ -33,13 +33,13 @@ echo $response->responseHeaders(); $response_body = json_decode($response->responseBody()); $api_key_id = $response_body->api_key_id; -# GET Single +// GET Single $response = $client->version('/v3')->api_keys()->_($api_key_id)->get(); echo $response->statusCode(); echo $response->responseBody(); echo $response->responseHeaders(); -# PATCH +// PATCH $request_body = array( 'name' => 'A New Hope' ); @@ -48,7 +48,7 @@ echo $response->statusCode(); echo $response->responseBody(); echo $response->responseHeaders(); -# PUT +// PUT $request_body = array( 'name' => 'A New Hope', 'scopes' => array( @@ -61,7 +61,7 @@ echo $response->statusCode(); echo $response->responseBody(); echo $response->responseHeaders(); -# DELETE +// DELETE $response = $client->api_keys()->_($api_key_id)->delete(); echo $response->statusCode(); echo $response->responseBody(); |