Google PHP API too many files(Google PHP API 文件过多)
问题描述
我正在尝试使用 Google Analytics Reporting API v4 为 WordPress 创建插件 https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-php
I am trying to create a plugin for WordPress using the Google Analytics Reporting API v4 https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-php
我们需要加载 Google API PHP 客户端库require_once __DIR__ .'/vendor/autoload.php';
We need to load the Google API PHP Client Library
require_once __DIR__ . '/vendor/autoload.php';
我已经下载了最新版本的 Google API https://github.com/google/google-api-php-client/releases 但供应商文件夹包含 7000 多个文件!
I have downloaded the latest release of Google API https://github.com/google/google-api-php-client/releases but the vendor folder contains more than 7000 files!
我的问题是我在这里做错了什么还是遗漏了什么?在供应商文件夹中,我可以看到所有的 Google 服务.如何在 WordPress 插件中以较少的文件使用 Google API?我将不胜感激任何对正确方向的帮助.
My question is if I am doing something wrong here or I am missing something? Inside the vendor folder I can see all the Google services. How I can use the Google API with less files in a WordPress plugin? I will appreciate any help to the right direction.
推荐答案
默认情况下,Google/Service 目录包含访问每个 Google Discovery 服务 API 所需的所有代码.从技术上讲,您不需要所有文件.您可以安全地删除 Google/Service 下不需要的所有内容.
By default the Google/Service directory contains all the code needed to access every Google Discovery services API. You don't technically need all of the files. You can safely delete everything under Google/Service that you don't need.
不要从任何其他目录中删除文件.只需删除不需要的 API.
Dont delete files from any of the other directories. Just remove the unneeded APIs.
这篇关于Google PHP API 文件过多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Google PHP API 文件过多


- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- PHP - if 语句中的倒序 2021-01-01