dqqs64238 2019-07-17 09:10
浏览 73

通过API检查Google通讯录数据中的更新

I'm working on a web program (with PHP) that uses data from Google Contacts (via People API, but I'm willing to switch to a different API if this is what it takes). The problem is that getting lots of data from google every time is slow.

To speed things up I want to cache the data in my database, but I still need to make sure the information is always up to date.

In Google Calendar I can use Push Notifications for this purpose, but as far as I know there is no such thing in any of Google Contacts' APIs.

Is there a way to quickly check if any changes were made without requesting the data of all the contacts?

You don't have to write code, just point me in the right direction :)

What I know so far

I can check if the contact's etag matches the cached etag to find out whether the contact was edited since it was last cached, but it still requires requesting some of the data of all the contacts to compare the etags, so I end up reducing the traffic by not requesting ALL the data until I know I need it, but it's still more network traffic than I would like.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
    • ¥15 lammps拉伸应力应变曲线分析
    • ¥15 C++ 头文件/宏冲突问题解决
    • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
    • ¥50 安卓adb backup备份子用户应用数据失败
    • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
    • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
    • ¥30 python代码,帮调试,帮帮忙吧
    • ¥15 #MATLAB仿真#车辆换道路径规划
    • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建