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 文件过多
基础教程推荐
- php中的foreach复选框POST 2021-01-01
- PHPUnit 的 Selenium 2 文档到底在哪里? 2022-01-01
- Web 服务器如何处理请求? 2021-01-01
- php中的PDF导出 2022-01-01
- 使用 scandir() 在目录中查找文件夹 (PHP) 2022-01-01
- 如何在数学上评估像“2-1"这样的字符串?产生“1"? 2022-01-01
- 主题化 Drupal 7 的 Ubercart “/cart"页 2021-01-01
- php 7.4 在写入变量中的 Twig 问题 2022-01-01
- 将变量从树枝传递给 js 2022-01-01
- Yii2 - 在运行时设置邮件传输参数 2022-01-01
