Google PHP API的文件过多 [英] Google PHP API too many files

查看:33
本文介绍了Google PHP API的文件过多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Google Analytics Reporting API v4 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/服务下不需要的所有内容.

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的文件过多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆