Browse Source

Update readme to reflect composer package.

Shane Mc Cormack 8 years ago
parent
commit
4367f97d78
1 changed files with 8 additions and 2 deletions
  1. 8 2
      README.md

+ 8 - 2
README.md

@@ -5,11 +5,13 @@ At the moment this is a very simple library, will composerise this in future and
 
 This implements version 1.0 of the API as documented at https://api.mydnshost.co.uk/1.0/docs/
 
+Installation is via `composer require mydnshost/mydnshost-php-api`
+
 Example usage, listing domains:
 
 ```php
-  require_once(dirname(__FILE__) . '/MyDNSHostAPI.php');
-  $api = new MyDNSHostAPI('https://api.mydnshost.co.uk/');
+  require_once(__DIR__ . '/vendor/autoload.php');
+  $api = new MyDNSHostAPI($config['api']);
   $api->setAuthUserKey('admin@example.org', 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE');
 
   $domains = $api->getDomains();
@@ -18,6 +20,10 @@ Example usage, listing domains:
 
 Example usage, importing zone files:
 ```php
+  require_once(__DIR__ . '/vendor/autoload.php');
+  $api = new MyDNSHostAPI($config['api']);
+  $api->setAuthUserKey('admin@example.org', 'AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE');
+
   $domain = 'test.com';
   $zonedata = file_get_contents('test.com.db');