From e23ecf247ba2cee1108436f60b78561155792836 Mon Sep 17 00:00:00 2001 From: Wogan May Date: Fri, 4 May 2018 01:25:38 +0200 Subject: [PATCH] Renaming Services to API for consistency --- docs/{services.rst => api.rst} | 6 +++--- docs/overview.rst | 6 +++--- src/{Services => API}/Admin.php | 2 +- src/{Services => API}/DataSet.php | 2 +- src/{Services => API}/Group.php | 2 +- src/{Services => API}/Page.php | 2 +- src/{Services => API}/User.php | 2 +- src/Client.php | 10 +++++----- src/DomoPHP.php | 1 - 9 files changed, 16 insertions(+), 17 deletions(-) rename docs/{services.rst => api.rst} (99%) rename src/{Services => API}/Admin.php (97%) rename src/{Services => API}/DataSet.php (99%) rename src/{Services => API}/Group.php (98%) rename src/{Services => API}/Page.php (99%) rename src/{Services => API}/User.php (98%) diff --git a/docs/services.rst b/docs/api.rst similarity index 99% rename from docs/services.rst rename to docs/api.rst index 379e893..4111f4c 100644 --- a/docs/services.rst +++ b/docs/api.rst @@ -1,6 +1,6 @@ -======== -Services -======== +=== +API +=== Activity Logs ------------- diff --git a/docs/overview.rst b/docs/overview.rst index 894167c..c87773e 100644 --- a/docs/overview.rst +++ b/docs/overview.rst @@ -2,17 +2,17 @@ Overview ======== -The domo-php library is organized into two parts - Services and Helpers. Mostly you'll be using the Services to interact with the API itself. The Helpers streamline some of the more tedious tasks. +The domo-php library is organized into two parts - API and Helpers. Mostly you'll be using the API object to interact with the API itself. The Helpers streamline some of the more tedious tasks. This distinction is made in the object structure itself:: $client = new DomoPHP($id, $secret); - $client->API; // Services that use the Domo API + $client->API; // Proxies for accessing the Domo API $client->Helpers; // Helpers for the more tedious stuff .. toctree:: :maxdepth: 2 - services + api helpers \ No newline at end of file diff --git a/src/Services/Admin.php b/src/API/Admin.php similarity index 97% rename from src/Services/Admin.php rename to src/API/Admin.php index 19b4ebd..4488bab 100644 --- a/src/Services/Admin.php +++ b/src/API/Admin.php @@ -1,6 +1,6 @@ setScopes($scopes); // Services - $this->DataSet = new Services\DataSet($this); - $this->Group = new Services\Group($this); - $this->User = new Services\User($this); - $this->Page = new Services\Page($this); - $this->Admin = new Services\Admin($this); + $this->DataSet = new API\DataSet($this); + $this->Group = new API\Group($this); + $this->User = new API\User($this); + $this->Page = new API\Page($this); + $this->Admin = new API\Admin($this); } /** diff --git a/src/DomoPHP.php b/src/DomoPHP.php index ab87e2f..cd74cd4 100644 --- a/src/DomoPHP.php +++ b/src/DomoPHP.php @@ -23,7 +23,6 @@ class DomoPHP public function __construct($client_id, $client_secret) { $this->API = new Client($client_id, $client_secret); - $this->Helpers = new Helpers\Helpers; }