From d34435872c9d20f5b7234de20c97667efc4506c1 Mon Sep 17 00:00:00 2001 From: Michael Roterman Date: Sat, 18 Jan 2014 17:22:42 +0100 Subject: [PATCH] Updating README to reflect latest change to support https --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 5686e4a1..22756b8f 100644 --- a/README.md +++ b/README.md @@ -47,10 +47,22 @@ General API Usage If your looking for a simple array entry point the API namespace is the place to be. +First we always have to construct the client: + ```php $token = new \Tmdb\ApiToken('your_tmdb_api_key_here'); $client = new \Tmdb\Client($token); +``` + +Or if you prefer requests to happen securely: + +```php +$client = new \Tmdb\Client($token, null, true); +``` +Then we do some work on it: + +```php $images = $client->getMoviesApi()->getMovie(550); ``` @@ -72,6 +84,12 @@ $token = new \Tmdb\ApiToken('your_tmdb_api_key_here'); $client = new \Tmdb\Client($token); ``` +Or if you prefer requests to happen securely: + +```php +$client = new \Tmdb\Client($token, null, true); +``` + Then you pass this client onto one of the many repositories and do some work on it. ```php