amaughan81/google-contacts

用于服务器到服务器应用的缺失PHP Google Contact API客户端

1.0 2017-02-12 21:06 UTC

This package is not auto-updated.

Last update: 2024-09-28 19:09:49 UTC


README

这是使用Google Contacts V3 API管理用户联系人的缺失PHP客户端

特性

  • 列出所有联系人
  • 获取单个联系人
  • 搜索联系人
  • 获取联系人照片
  • 创建/更新/删除联系人
  • 批量创建/更新/删除联系人

安装

在你的 compose.json 文件中添加以下依赖项

{
	"require": {
      "google/apiclient": "^2.0",
      "google/apiclient-services" : "dev-master",
      "guzzlehttp/guzzle": "^6.2"
	},
  "autoload": {
    "psr-4": {
      "amaughan81\\": "vendor/amaughan81/GoogleContacts/src/"
    }
  }
}

然后运行 composer update

配置

注意这个应用程序是为 服务器到服务器 场景设计的,因此如果你在其他场景中使用此应用程序,可能需要一些额外的编码。

  1. 运行 git clone https://github.com/amaughan81/GoogleContacts amaughan81/GoogleContacts
  2. 确保已安装所需的依赖项。请参见上面的 require composer packages。
  3. 更新文件 config.json 并完成 secret_pathclient_pathsubjectdeveloperKey 的值。这些值可以在 Google 开发者控制台中获取:https://console.developers.google.com。其中 secret_pathclient_path 是服务器上JSON文件的路径,这些文件是从 Google 控制台获取的。