diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 97ee217..92fab84 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -4,7 +4,7 @@ This documentation is for developers interested in using the GOV.UK Notify PHP c ## Set up the client -The Notify PHP Client is based on a [PSR-7 HTTP model](https://www.php-fig.org/psr/psr-7/) [external link]. To install it, you must select your preferred HTTP client. You can follow these instructions to use [Guzzle v6 and v5](http://docs.guzzlephp.org/en/stable/) and [cURL](http://php.net/manual/en/book.curl.php) [external links]. +The Notify PHP Client is based on a [PSR-7 HTTP model](https://www.php-fig.org/psr/psr-7/) [external link]. To install it, you must select your preferred PSR-7 compatible HTTP client. You can follow these instructions to use [Guzzle v6 and v5](http://docs.guzzlephp.org/en/stable/)[external link]. ### Guzzle v6 @@ -53,31 +53,6 @@ To get an API key, [sign in to GOV.UK Notify](https://www.notifications.service. To get an API key, [sign in to GOV.UK Notify](https://www.notifications.service.gov.uk/sign-in) and go to the __API integration__ page. You can find more information in the [API keys](#api-keys) section of this documentation. -### cURL - -1. Use [Composer](https://getcomposer.org/) [external link] to install the GOV.UK Notify PHP client. Run the following in the command line: - - ```sh - composer require php-http/curl-client php-http/message alphagov/notifications-php-client - ``` - -You can now use the [autoloader](https://getcomposer.org/doc/01-basic-usage.md#autoloading) [external link] to download the GOV.UK Notify PHP client. - -1. Add the following code to your application to create a new instance of the client: - - ``` - $notifyClient = new \Alphagov\Notifications\Client([ - 'apiKey' => '{your api key}', - 'httpClient' => new \Http\Client\Curl\Client( - new \Http\Message\MessageFactory\GuzzleMessageFactory, - new \Http\Message\StreamFactory\GuzzleStreamFactory - ), - ]); - ``` - -1. Run `$notifyClient` to access the GOV.UK Notify API. - -To get an API key, [sign in to GOV.UK Notify](https://www.notifications.service.gov.uk/sign-in) and go to the __API integration__ page. You can find more information in the [API keys](#api-keys) section of this documentation. ## Send a message