diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1da8522 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea diff --git a/examples/adexchangebuyer/BaseExample.php b/examples/adexchangebuyer/BaseExample.php index 45b047b..dd7a897 100644 --- a/examples/adexchangebuyer/BaseExample.php +++ b/examples/adexchangebuyer/BaseExample.php @@ -19,7 +19,7 @@ * Include the Ad Exchange Buyer service class and the HTML generation * functions. */ -require_once "../../src/contrib/apiAdexchangebuyerService.php"; +require_once "../../src/Contrib/apiAdexchangebuyerService.php"; require_once "htmlHelper.php"; /** diff --git a/examples/adexchangebuyer/index.php b/examples/adexchangebuyer/index.php index e611732..e4ccce7 100644 --- a/examples/adexchangebuyer/index.php +++ b/examples/adexchangebuyer/index.php @@ -23,7 +23,7 @@ */ require_once "../../src/apiClient.php"; -require_once "../../src/contrib/apiAdexchangebuyerService.php"; +require_once "../../src/Contrib/apiAdexchangebuyerService.php"; require_once "htmlHelper.php"; session_start(); diff --git a/examples/adsense/AdSenseAuth.php b/examples/adsense/AdSenseAuth.php index 6fe3c70..0ae3627 100644 --- a/examples/adsense/AdSenseAuth.php +++ b/examples/adsense/AdSenseAuth.php @@ -24,7 +24,7 @@ * Include the library files for the api client and AdSense service class. */ require_once "../../src/apiClient.php"; -require_once "../../src/contrib/apiAdsenseService.php"; +require_once "../../src/Contrib/apiAdsenseService.php"; /** * Handles authentication and OAuth token storing. diff --git a/examples/adsense/BaseExample.php b/examples/adsense/BaseExample.php index 3233618..ad72ef6 100644 --- a/examples/adsense/BaseExample.php +++ b/examples/adsense/BaseExample.php @@ -18,7 +18,7 @@ /** * Include the AdSense service class and the HTML generation functions. */ -require_once "../../src/contrib/apiAdsenseService.php"; +require_once "../../src/Contrib/apiAdsenseService.php"; require_once "htmlHelper.php"; /** diff --git a/examples/adsensehost/AdSenseAuth.php b/examples/adsensehost/AdSenseAuth.php index 8d98fa6..15e92d7 100644 --- a/examples/adsensehost/AdSenseAuth.php +++ b/examples/adsensehost/AdSenseAuth.php @@ -24,7 +24,7 @@ * Include the library files for the api client and AdSense service class. */ require_once "../../src/apiClient.php"; -require_once "../../src/contrib/apiAdsensehostService.php"; +require_once "../../src/Contrib/apiAdsensehostService.php"; /** * Handles authentication and OAuth token storing. diff --git a/examples/adsensehost/BaseExample.php b/examples/adsensehost/BaseExample.php index 3cc624f..0c1a2b6 100644 --- a/examples/adsensehost/BaseExample.php +++ b/examples/adsensehost/BaseExample.php @@ -19,7 +19,7 @@ * Include the libraries file for the AdSense service class and the HTML * generation functions. */ -require_once "../../src/contrib/apiAdsensehostService.php"; +require_once "../../src/Contrib/apiAdsensehostService.php"; require_once "htmlHelper.php"; /** diff --git a/examples/affiliateNetwork/index.php b/examples/affiliateNetwork/index.php index baafde2..bc20e8d 100644 --- a/examples/affiliateNetwork/index.php +++ b/examples/affiliateNetwork/index.php @@ -15,7 +15,7 @@ * limitations under the License. */ require_once '../../src/apiClient.php'; -require_once '../../src/contrib/apiGanService.php'; +require_once '../../src/Contrib/apiGanService.php'; session_start(); diff --git a/examples/analytics/simple.php b/examples/analytics/simple.php index 64811fc..e5e7735 100644 --- a/examples/analytics/simple.php +++ b/examples/analytics/simple.php @@ -1,6 +1,6 @@ setApplicationName("My_Books_API_Example"); diff --git a/examples/calendar/simple.php b/examples/calendar/simple.php index aa46e87..fc025cf 100644 --- a/examples/calendar/simple.php +++ b/examples/calendar/simple.php @@ -1,6 +1,6 @@ setApplicationName("PageSpeedOnline_Example_App"); diff --git a/examples/plus/index.php b/examples/plus/index.php index 5ba7008..7aefcc1 100644 --- a/examples/plus/index.php +++ b/examples/plus/index.php @@ -15,7 +15,7 @@ * limitations under the License. */ require_once '../../src/apiClient.php'; -require_once '../../src/contrib/apiPlusService.php'; +require_once '../../src/Contrib/apiPlusService.php'; session_start(); diff --git a/examples/plus/simple.php b/examples/plus/simple.php index 78a6ab6..649ad27 100644 --- a/examples/plus/simple.php +++ b/examples/plus/simple.php @@ -1,6 +1,6 @@ setApplicationName("Google Shopping PHP Starter Application"); diff --git a/examples/siteVerification/simple.php b/examples/siteVerification/simple.php index 4836b78..0091dc8 100644 --- a/examples/siteVerification/simple.php +++ b/examples/siteVerification/simple.php @@ -1,6 +1,6 @@ setApplicationName('Google Translate PHP Starter Application'); diff --git a/examples/urlshortener/index.php b/examples/urlshortener/index.php index a1b2ce4..49febec 100644 --- a/examples/urlshortener/index.php +++ b/examples/urlshortener/index.php @@ -17,7 +17,7 @@ session_start(); require_once '../../src/apiClient.php'; -require_once '../../src/contrib/apiUrlshortenerService.php'; +require_once '../../src/Contrib/apiUrlshortenerService.php'; // Visit https://code.google.com/apis/console to // generate your client id, client secret, and redirect uri. diff --git a/examples/userinfo/index.php b/examples/userinfo/index.php index 3b06060..39fb167 100644 --- a/examples/userinfo/index.php +++ b/examples/userinfo/index.php @@ -15,7 +15,7 @@ * limitations under the License. */ require_once '../../src/apiClient.php'; -require_once '../../src/contrib/apiOauth2Service.php'; +require_once '../../src/Contrib/apiOauth2Service.php'; session_start(); $client = new apiClient(); diff --git a/examples/webfonts/simple.php b/examples/webfonts/simple.php index 5a967f4..cd9cda0 100644 --- a/examples/webfonts/simple.php +++ b/examples/webfonts/simple.php @@ -1,6 +1,6 @@ setApplicationName("Google WebFonts PHP Starter Application"); diff --git a/src/GoogleApi/Auth/Auth.php b/src/GoogleApi/Auth/Auth.php index c5f95a5..419d77b 100644 --- a/src/GoogleApi/Auth/Auth.php +++ b/src/GoogleApi/Auth/Auth.php @@ -23,7 +23,7 @@ * @author Chris Chabot * */ -abstract class apiAuth { +abstract class Auth { abstract public function authenticate($service); abstract public function sign(HttpRequest $request); abstract public function createAuthUrl($scope); diff --git a/src/GoogleApi/Auth/OAuth2.php b/src/GoogleApi/Auth/OAuth2.php index d0f18dc..d972b39 100644 --- a/src/GoogleApi/Auth/OAuth2.php +++ b/src/GoogleApi/Auth/OAuth2.php @@ -19,6 +19,7 @@ use GoogleApi\Client; use GoogleApi\Io\HttpRequest; use GoogleApi\Service\Utils; +use GoogleApi\Auth\Auth; /** * Authentication class that deals with the OAuth 2 web-server authentication flow diff --git a/src/GoogleApi/contrib/apiAnalyticsService.php b/src/GoogleApi/Contrib/AnalyticsService.php similarity index 95% rename from src/GoogleApi/contrib/apiAnalyticsService.php rename to src/GoogleApi/Contrib/AnalyticsService.php index 328695a..1d92842 100644 --- a/src/GoogleApi/contrib/apiAnalyticsService.php +++ b/src/GoogleApi/Contrib/AnalyticsService.php @@ -15,20 +15,22 @@ * the License. */ -require_once 'service/apiModel.php'; -require_once 'service/apiService.php'; -require_once 'service/apiServiceRequest.php'; +namespace GoogleApi\Contrib; +use GoogleApi\Service\ServiceResource; +use GoogleApi\Service\Model; +use GoogleApi\Service\Service; +use GoogleApi\Client; /** * The "management" collection of methods. * Typical usage is: * - * $analyticsService = new apiAnalyticsService(...); + * $analyticsService = new AnalyticsService(...); * $management = $analyticsService->management; * */ - class ManagementServiceResource extends apiServiceResource { + class ManagementServiceResource extends ServiceResource { } @@ -38,11 +40,11 @@ class ManagementServiceResource extends apiServiceResource { * The "webproperties" collection of methods. * Typical usage is: * - * $analyticsService = new apiAnalyticsService(...); + * $analyticsService = new AnalyticsService(...); * $webproperties = $analyticsService->webproperties; * */ - class ManagementWebpropertiesServiceResource extends apiServiceResource { + class ManagementWebpropertiesServiceResource extends ServiceResource { /** @@ -70,11 +72,11 @@ public function listManagementWebproperties($accountId, $optParams = array()) { * The "segments" collection of methods. * Typical usage is: * - * $analyticsService = new apiAnalyticsService(...); + * $analyticsService = new AnalyticsService(...); * $segments = $analyticsService->segments; * */ - class ManagementSegmentsServiceResource extends apiServiceResource { + class ManagementSegmentsServiceResource extends ServiceResource { /** @@ -101,11 +103,11 @@ public function listManagementSegments($optParams = array()) { * The "accounts" collection of methods. * Typical usage is: * - * $analyticsService = new apiAnalyticsService(...); + * $analyticsService = new AnalyticsService(...); * $accounts = $analyticsService->accounts; * */ - class ManagementAccountsServiceResource extends apiServiceResource { + class ManagementAccountsServiceResource extends ServiceResource { /** @@ -132,11 +134,11 @@ public function listManagementAccounts($optParams = array()) { * The "goals" collection of methods. * Typical usage is: * - * $analyticsService = new apiAnalyticsService(...); + * $analyticsService = new AnalyticsService(...); * $goals = $analyticsService->goals; * */ - class ManagementGoalsServiceResource extends apiServiceResource { + class ManagementGoalsServiceResource extends ServiceResource { /** @@ -166,11 +168,11 @@ public function listManagementGoals($accountId, $webPropertyId, $profileId, $opt * The "profiles" collection of methods. * Typical usage is: * - * $analyticsService = new apiAnalyticsService(...); + * $analyticsService = new AnalyticsService(...); * $profiles = $analyticsService->profiles; * */ - class ManagementProfilesServiceResource extends apiServiceResource { + class ManagementProfilesServiceResource extends ServiceResource { /** @@ -200,11 +202,11 @@ public function listManagementProfiles($accountId, $webPropertyId, $optParams = * The "data" collection of methods. * Typical usage is: * - * $analyticsService = new apiAnalyticsService(...); + * $analyticsService = new AnalyticsService(...); * $data = $analyticsService->data; * */ - class DataServiceResource extends apiServiceResource { + class DataServiceResource extends ServiceResource { } @@ -214,11 +216,11 @@ class DataServiceResource extends apiServiceResource { * The "ga" collection of methods. * Typical usage is: * - * $analyticsService = new apiAnalyticsService(...); + * $analyticsService = new AnalyticsService(...); * $ga = $analyticsService->ga; * */ - class DataGaServiceResource extends apiServiceResource { + class DataGaServiceResource extends ServiceResource { /** @@ -266,7 +268,7 @@ public function get($ids, $start_date, $end_date, $metrics, $optParams = array() * * @author Google, Inc. */ -class apiAnalyticsService extends apiService { +class AnalyticsService extends Service { public $management_webproperties; public $management_segments; public $management_accounts; @@ -276,15 +278,15 @@ class apiAnalyticsService extends apiService { /** * Constructs the internal representation of the Analytics service. * - * @param apiClient apiClient + * @param $client \GoogleApi\Client */ - public function __construct(apiClient $apiClient) { + public function __construct(Client $client) { $this->rpcPath = '/rpc'; $this->restBasePath = '/analytics/v3/'; $this->version = 'v3'; $this->serviceName = 'analytics'; - $apiClient->addService($this->serviceName, $this->version); + $client->addService($this->serviceName, $this->version); $this->management_webproperties = new ManagementWebpropertiesServiceResource($this, $this->serviceName, 'webproperties', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/analytics.readonly"], "parameters": {"max-results": {"format": "int32", "type": "integer", "location": "query"}, "start-index": {"format": "int32", "minimum": "1", "type": "integer", "location": "query"}, "accountId": {"required": true, "type": "string", "location": "path"}}, "id": "analytics.management.webproperties.list", "httpMethod": "GET", "path": "management/accounts/{accountId}/webproperties", "response": {"$ref": "Webproperties"}}}}', true)); $this->management_segments = new ManagementSegmentsServiceResource($this, $this->serviceName, 'segments', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/analytics.readonly"], "parameters": {"max-results": {"format": "int32", "type": "integer", "location": "query"}, "start-index": {"format": "int32", "minimum": "1", "type": "integer", "location": "query"}}, "response": {"$ref": "Segments"}, "httpMethod": "GET", "path": "management/segments", "id": "analytics.management.segments.list"}}}', true)); $this->management_accounts = new ManagementAccountsServiceResource($this, $this->serviceName, 'accounts', json_decode('{"methods": {"list": {"scopes": ["https://www.googleapis.com/auth/analytics.readonly"], "parameters": {"max-results": {"format": "int32", "type": "integer", "location": "query"}, "start-index": {"format": "int32", "minimum": "1", "type": "integer", "location": "query"}}, "response": {"$ref": "Accounts"}, "httpMethod": "GET", "path": "management/accounts", "id": "analytics.management.accounts.list"}}}', true)); @@ -294,7 +296,7 @@ public function __construct(apiClient $apiClient) { } } -class Account extends apiModel { +class Account extends Model { public $kind; public $name; public $created; @@ -348,7 +350,7 @@ public function getSelfLink() { } } -class AccountChildLink extends apiModel { +class AccountChildLink extends Model { public $href; public $type; public function setHref($href) { @@ -365,7 +367,7 @@ public function getType() { } } -class Accounts extends apiModel { +class Accounts extends Model { public $username; public $kind; protected $__itemsType = 'Account'; @@ -427,7 +429,7 @@ public function getTotalResults() { } } -class GaData extends apiModel { +class GaData extends Model { public $kind; public $rows; public $containsSampledData; @@ -529,7 +531,7 @@ public function getSelfLink() { } } -class GaDataColumnHeaders extends apiModel { +class GaDataColumnHeaders extends Model { public $dataType; public $columnType; public $name; @@ -553,7 +555,7 @@ public function getName() { } } -class GaDataProfileInfo extends apiModel { +class GaDataProfileInfo extends Model { public $webPropertyId; public $internalWebPropertyId; public $tableId; @@ -598,7 +600,7 @@ public function getAccountId() { } } -class GaDataQuery extends apiModel { +class GaDataQuery extends Model { public $max_results; public $sort; public $dimensions; @@ -673,7 +675,7 @@ public function getEnd_date() { } } -class Goal extends apiModel { +class Goal extends Model { public $kind; protected $__visitTimeOnSiteDetailsType = 'GoalVisitTimeOnSiteDetails'; protected $__visitTimeOnSiteDetailsDataType = ''; @@ -812,7 +814,7 @@ public function getAccountId() { } } -class GoalEventDetails extends apiModel { +class GoalEventDetails extends Model { protected $__eventConditionsType = 'GoalEventDetailsEventConditions'; protected $__eventConditionsDataType = 'array'; public $eventConditions; @@ -832,7 +834,7 @@ public function getUseEventValue() { } } -class GoalEventDetailsEventConditions extends apiModel { +class GoalEventDetailsEventConditions extends Model { public $type; public $matchType; public $expression; @@ -870,7 +872,7 @@ public function getComparisonValue() { } } -class GoalParentLink extends apiModel { +class GoalParentLink extends Model { public $href; public $type; public function setHref($href) { @@ -887,7 +889,7 @@ public function getType() { } } -class GoalUrlDestinationDetails extends apiModel { +class GoalUrlDestinationDetails extends Model { public $url; public $caseSensitive; public $matchType; @@ -928,7 +930,7 @@ public function getFirstStepRequired() { } } -class GoalUrlDestinationDetailsSteps extends apiModel { +class GoalUrlDestinationDetailsSteps extends Model { public $url; public $name; public $number; @@ -952,7 +954,7 @@ public function getNumber() { } } -class GoalVisitNumPagesDetails extends apiModel { +class GoalVisitNumPagesDetails extends Model { public $comparisonType; public $comparisonValue; public function setComparisonType($comparisonType) { @@ -969,7 +971,7 @@ public function getComparisonValue() { } } -class GoalVisitTimeOnSiteDetails extends apiModel { +class GoalVisitTimeOnSiteDetails extends Model { public $comparisonType; public $comparisonValue; public function setComparisonType($comparisonType) { @@ -986,7 +988,7 @@ public function getComparisonValue() { } } -class Goals extends apiModel { +class Goals extends Model { public $username; public $kind; protected $__itemsType = 'Goal'; @@ -1048,7 +1050,7 @@ public function getTotalResults() { } } -class Profile extends apiModel { +class Profile extends Model { public $defaultPage; public $kind; public $excludeQueryParameters; @@ -1174,7 +1176,7 @@ public function getAccountId() { } } -class ProfileChildLink extends apiModel { +class ProfileChildLink extends Model { public $href; public $type; public function setHref($href) { @@ -1191,7 +1193,7 @@ public function getType() { } } -class ProfileParentLink extends apiModel { +class ProfileParentLink extends Model { public $href; public $type; public function setHref($href) { @@ -1208,7 +1210,7 @@ public function getType() { } } -class Profiles extends apiModel { +class Profiles extends Model { public $username; public $kind; protected $__itemsType = 'Profile'; @@ -1270,7 +1272,7 @@ public function getTotalResults() { } } -class Segment extends apiModel { +class Segment extends Model { public $definition; public $kind; public $segmentId; @@ -1329,7 +1331,7 @@ public function getName() { } } -class Segments extends apiModel { +class Segments extends Model { public $username; public $kind; protected $__itemsType = 'Segment'; @@ -1391,7 +1393,7 @@ public function getTotalResults() { } } -class Webproperties extends apiModel { +class Webproperties extends Model { public $username; public $kind; protected $__itemsType = 'Webproperty'; @@ -1453,7 +1455,7 @@ public function getTotalResults() { } } -class Webproperty extends apiModel { +class Webproperty extends Model { public $kind; public $name; public $created; @@ -1537,7 +1539,7 @@ public function getAccountId() { } } -class WebpropertyChildLink extends apiModel { +class WebpropertyChildLink extends Model { public $href; public $type; public function setHref($href) { @@ -1554,7 +1556,7 @@ public function getType() { } } -class WebpropertyParentLink extends apiModel { +class WebpropertyParentLink extends Model { public $href; public $type; public function setHref($href) { diff --git a/src/GoogleApi/contrib/apiAdexchangebuyerService.php b/src/GoogleApi/Contrib/apiAdexchangebuyerService.php similarity index 100% rename from src/GoogleApi/contrib/apiAdexchangebuyerService.php rename to src/GoogleApi/Contrib/apiAdexchangebuyerService.php diff --git a/src/GoogleApi/contrib/apiAdsenseService.php b/src/GoogleApi/Contrib/apiAdsenseService.php similarity index 100% rename from src/GoogleApi/contrib/apiAdsenseService.php rename to src/GoogleApi/Contrib/apiAdsenseService.php diff --git a/src/GoogleApi/contrib/apiAdsensehostService.php b/src/GoogleApi/Contrib/apiAdsensehostService.php similarity index 100% rename from src/GoogleApi/contrib/apiAdsensehostService.php rename to src/GoogleApi/Contrib/apiAdsensehostService.php diff --git a/src/GoogleApi/contrib/apiBigqueryService.php b/src/GoogleApi/Contrib/apiBigqueryService.php similarity index 100% rename from src/GoogleApi/contrib/apiBigqueryService.php rename to src/GoogleApi/Contrib/apiBigqueryService.php diff --git a/src/GoogleApi/contrib/apiBloggerService.php b/src/GoogleApi/Contrib/apiBloggerService.php similarity index 100% rename from src/GoogleApi/contrib/apiBloggerService.php rename to src/GoogleApi/Contrib/apiBloggerService.php diff --git a/src/GoogleApi/contrib/apiBooksService.php b/src/GoogleApi/Contrib/apiBooksService.php similarity index 100% rename from src/GoogleApi/contrib/apiBooksService.php rename to src/GoogleApi/Contrib/apiBooksService.php diff --git a/src/GoogleApi/contrib/apiCalendarService.php b/src/GoogleApi/Contrib/apiCalendarService.php similarity index 100% rename from src/GoogleApi/contrib/apiCalendarService.php rename to src/GoogleApi/Contrib/apiCalendarService.php diff --git a/src/GoogleApi/contrib/apiCustomsearchService.php b/src/GoogleApi/Contrib/apiCustomsearchService.php similarity index 100% rename from src/GoogleApi/contrib/apiCustomsearchService.php rename to src/GoogleApi/Contrib/apiCustomsearchService.php diff --git a/src/GoogleApi/contrib/apiDriveService.php b/src/GoogleApi/Contrib/apiDriveService.php similarity index 100% rename from src/GoogleApi/contrib/apiDriveService.php rename to src/GoogleApi/Contrib/apiDriveService.php diff --git a/src/GoogleApi/contrib/apiFreebaseService.php b/src/GoogleApi/Contrib/apiFreebaseService.php similarity index 100% rename from src/GoogleApi/contrib/apiFreebaseService.php rename to src/GoogleApi/Contrib/apiFreebaseService.php diff --git a/src/GoogleApi/contrib/apiGanService.php b/src/GoogleApi/Contrib/apiGanService.php similarity index 100% rename from src/GoogleApi/contrib/apiGanService.php rename to src/GoogleApi/Contrib/apiGanService.php diff --git a/src/GoogleApi/contrib/apiGroupssettingsService.php b/src/GoogleApi/Contrib/apiGroupssettingsService.php similarity index 100% rename from src/GoogleApi/contrib/apiGroupssettingsService.php rename to src/GoogleApi/Contrib/apiGroupssettingsService.php diff --git a/src/GoogleApi/contrib/apiLatitudeService.php b/src/GoogleApi/Contrib/apiLatitudeService.php similarity index 100% rename from src/GoogleApi/contrib/apiLatitudeService.php rename to src/GoogleApi/Contrib/apiLatitudeService.php diff --git a/src/GoogleApi/contrib/apiModeratorService.php b/src/GoogleApi/Contrib/apiModeratorService.php similarity index 100% rename from src/GoogleApi/contrib/apiModeratorService.php rename to src/GoogleApi/Contrib/apiModeratorService.php diff --git a/src/GoogleApi/contrib/apiOauth2Service.php b/src/GoogleApi/Contrib/apiOauth2Service.php similarity index 100% rename from src/GoogleApi/contrib/apiOauth2Service.php rename to src/GoogleApi/Contrib/apiOauth2Service.php diff --git a/src/GoogleApi/contrib/apiOrkutService.php b/src/GoogleApi/Contrib/apiOrkutService.php similarity index 100% rename from src/GoogleApi/contrib/apiOrkutService.php rename to src/GoogleApi/Contrib/apiOrkutService.php diff --git a/src/GoogleApi/contrib/apiPagespeedonlineService.php b/src/GoogleApi/Contrib/apiPagespeedonlineService.php similarity index 100% rename from src/GoogleApi/contrib/apiPagespeedonlineService.php rename to src/GoogleApi/Contrib/apiPagespeedonlineService.php diff --git a/src/GoogleApi/contrib/apiPlusService.php b/src/GoogleApi/Contrib/apiPlusService.php similarity index 100% rename from src/GoogleApi/contrib/apiPlusService.php rename to src/GoogleApi/Contrib/apiPlusService.php diff --git a/src/GoogleApi/contrib/apiPredictionService.php b/src/GoogleApi/Contrib/apiPredictionService.php similarity index 100% rename from src/GoogleApi/contrib/apiPredictionService.php rename to src/GoogleApi/Contrib/apiPredictionService.php diff --git a/src/GoogleApi/contrib/apiShoppingService.php b/src/GoogleApi/Contrib/apiShoppingService.php similarity index 100% rename from src/GoogleApi/contrib/apiShoppingService.php rename to src/GoogleApi/Contrib/apiShoppingService.php diff --git a/src/GoogleApi/contrib/apiSiteVerificationService.php b/src/GoogleApi/Contrib/apiSiteVerificationService.php similarity index 100% rename from src/GoogleApi/contrib/apiSiteVerificationService.php rename to src/GoogleApi/Contrib/apiSiteVerificationService.php diff --git a/src/GoogleApi/contrib/apiTasksService.php b/src/GoogleApi/Contrib/apiTasksService.php similarity index 100% rename from src/GoogleApi/contrib/apiTasksService.php rename to src/GoogleApi/Contrib/apiTasksService.php diff --git a/src/GoogleApi/contrib/apiTranslateService.php b/src/GoogleApi/Contrib/apiTranslateService.php similarity index 100% rename from src/GoogleApi/contrib/apiTranslateService.php rename to src/GoogleApi/Contrib/apiTranslateService.php diff --git a/src/GoogleApi/contrib/apiUrlshortenerService.php b/src/GoogleApi/Contrib/apiUrlshortenerService.php similarity index 100% rename from src/GoogleApi/contrib/apiUrlshortenerService.php rename to src/GoogleApi/Contrib/apiUrlshortenerService.php diff --git a/src/GoogleApi/contrib/apiWebfontsService.php b/src/GoogleApi/Contrib/apiWebfontsService.php similarity index 100% rename from src/GoogleApi/contrib/apiWebfontsService.php rename to src/GoogleApi/Contrib/apiWebfontsService.php diff --git a/src/GoogleApi/config.php b/src/GoogleApi/config.php index 22ee535..e26db03 100644 --- a/src/GoogleApi/config.php +++ b/src/GoogleApi/config.php @@ -42,9 +42,9 @@ 'site_name' => 'www.example.org', // Which Authentication, Storage and HTTP IO classes to use. - 'authClass' => 'apiOAuth2', - 'ioClass' => 'apiCurlIO', - 'cacheClass' => 'apiFileCache', + 'authClass' => 'GoogleApi\Auth\OAuth2', + 'ioClass' => 'GoogleApi\Io\CurlIO', + 'cacheClass' => 'GoogleApi\Cache\FileCache', // If you want to run the test suite (by running # phpunit AllTests.php in the tests/ directory), fill in the settings below 'oauth_test_token' => '', // the oauth access token to use (which you can get by runing authenticate() as the test user and copying the token value), ie '{"key":"foo","secret":"bar","callback_url":null}' diff --git a/test/adsense/AdSenseTest.php b/test/adsense/AdSenseTest.php index aa2b19c..e97dfcd 100644 --- a/test/adsense/AdSenseTest.php +++ b/test/adsense/AdSenseTest.php @@ -15,7 +15,7 @@ * limitations under the License. */ -require_once '../src/contrib/apiAdsenseService.php'; +require_once '../src/Contrib/apiAdsenseService.php'; class AdsenseTests extends PHPUnit_Framework_TestSuite { public static function suite() { diff --git a/test/general/ApiBatchRequestTest.php b/test/general/ApiBatchRequestTest.php index dddf442..371a4ae 100644 --- a/test/general/ApiBatchRequestTest.php +++ b/test/general/ApiBatchRequestTest.php @@ -19,7 +19,7 @@ */ require_once 'BaseTest.php'; -require_once '../src/contrib/apiPlusService.php'; +require_once '../src/Contrib/apiPlusService.php'; require_once '../src/service/apiBatchRequest.php'; class ApiBatchRequestTest extends BaseTest { diff --git a/test/general/ServiceTest.php b/test/general/ServiceTest.php index 52c1944..dde5f93 100644 --- a/test/general/ServiceTest.php +++ b/test/general/ServiceTest.php @@ -17,7 +17,7 @@ * specific language governing permissions and limitations * under the License. */ -require_once '../src/contrib/apiPlusService.php'; +require_once '../src/Contrib/apiPlusService.php'; class AnimalServiceResource extends apiServiceResource { public function stripNull($o) { diff --git a/test/pagespeed/PageSpeedTest.php b/test/pagespeed/PageSpeedTest.php index 22921a0..142734c 100644 --- a/test/pagespeed/PageSpeedTest.php +++ b/test/pagespeed/PageSpeedTest.php @@ -15,7 +15,7 @@ * limitations under the License. */ -require_once '../src/contrib/apiPagespeedonlineService.php'; +require_once '../src/Contrib/apiPagespeedonlineService.php'; class PageSpeedTest extends BaseTest { public $service; diff --git a/test/plus/PlusTest.php b/test/plus/PlusTest.php index 2fb46e2..3c2d819 100644 --- a/test/plus/PlusTest.php +++ b/test/plus/PlusTest.php @@ -15,7 +15,7 @@ * limitations under the License. */ -require_once '../src/contrib/apiPlusService.php'; +require_once '../src/Contrib/apiPlusService.php'; class AllPlusTests extends PHPUnit_Framework_TestSuite { public static function suite() { diff --git a/test/tasks/TasksTest.php b/test/tasks/TasksTest.php index 5710cb0..7a02acf 100644 --- a/test/tasks/TasksTest.php +++ b/test/tasks/TasksTest.php @@ -15,7 +15,7 @@ * limitations under the License. */ -require_once '../src/contrib/apiTasksService.php'; +require_once '../src/Contrib/apiTasksService.php'; class TasksTest extends BaseTest { public $taskService; diff --git a/test/urlshortener/UrlShortenerTests.php b/test/urlshortener/UrlShortenerTests.php index 1f50ace..aaf4c3b 100644 --- a/test/urlshortener/UrlShortenerTests.php +++ b/test/urlshortener/UrlShortenerTests.php @@ -16,7 +16,7 @@ */ require_once '../src/apiClient.php'; -require_once '../src/contrib/apiUrlshortenerService.php'; +require_once '../src/Contrib/apiUrlshortenerService.php'; class UrlShortenerTests extends BaseTest { public $service;