如何在本地主机上测试谷歌日历api v3 [英] How to test google calendar api v3 on localhost

查看:129
本文介绍了如何在本地主机上测试谷歌日历api v3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在本地主机上的javascript实现中测试Google Calendar API v3客户端只读数据?我只想解析用jquery检索的json,如 $。getJSON(restfulUrl,successFunction(data));



这是我读过的成功与v3连接并在我的web服务器上获取json的文章:
使用JQuery解析Google日历v3 API JSON



但是,必须上传新版本令人难以置信的讨厌每次我想测试时,我的开发脚本。由于我在Google Developers Console中将我的Web服务器域列在公共api访问引用中,因此我能够获得这一点。我将我的组织IP列在同一个引荐者列表中,但这不起作用。我也尝试添加 localhost googleapis.com ,但这些都不起作用。

$ b $如果您通过搜索引擎找到了这个Q& A,您可能会发现访问更深入讨论的主题很有帮助: Google日历API v3访问未配置



我必须先管理我的项目,首先访问 https://console.developers.google.com/project



我点击了修改允许的引荐来源按钮并将其添加到列表中:

  localhost 
localhost / *
* .localhost / *
* .localhost
127.0.0.1/*

在撰写本文时,这些都是在 APIs& auth>凭证。即使是公开可用的日历,这也是必要的。


Is it possible to test Google Calendar API v3 client side read-only data in javascript implementation on the localhost? I simply want to parse json retrieved with jquery such as $.getJSON(restfulUrl, successFunction(data));

This is the post I read to succeed in connecting with v3 and getting the json on my web server: Parse Google Calendar v3 API JSON with JQuery

However, it is incredibly obnoxious to have to upload a new version of my development script every time I want to test it. I am able to get this far because I listed my web server domain under public api access referrers in the Google Developers Console. I listed my organization IP in the same referrer list, but that does not work. I also tried adding localhost and googleapis.com but those don't work either.

解决方案

If you found this Q&A by search engine, you may also find it helpful to visit the more thoroughly discussed topic at Google Calendar API v3 Access Not Configured

I had to manage my project, first by visiting https://console.developers.google.com/project.

I clicked the Edit allowed referrers button and added these to the list:

localhost
localhost/*
*.localhost/*
*.localhost
127.0.0.1/*

At the time of writing, this was all done under APIs & auth > Credentials. This is necessary even for publicly available calendars.

这篇关于如何在本地主机上测试谷歌日历api v3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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