我一天最多可以拨打多少个服务电话? [英] How many service calls am I allowed in a day?

查看:125
本文介绍了我一天最多可以拨打多少个服务电话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了两组地址.一个跨第二行从B2开始,另一行从第一行向下从A3开始.我试图使用自定义函数调用Google的api,以分钟为单位获取第一列中所有位置到第二行中所有位置的行车时间列表.我收到一条错误消息,指出它在一天内运行了很多次.这是自定义功能

I've set up two sets of address. One across the second row starting at B2 and another down the first column starting at A3. Using a custom function invoking google's api I am trying to get a list of drive times in minutes for all locations in the first column to all locations in the second row. I get an error stating that it has ran to many times in one day. Here is the custom function

function DriveTime(origin, destination) {
  var directions = Maps.newDirectionFinder()
  .setOrigin(origin)
  .setDestination(destination)
  .getDirections();
  return directions.routes[0].legs[0].duration.value/60;  
}

错误:服务在一天中被调用太多次:路线(第2行)

Error: Service invoked too many times in one day: route (line 2)

我了解此错误,但是作为标准的免费用户,一天之内可以拨打多少次电话.在哪里可以找到增加该服务每日通话量的价格?

I understand the error, but how many times in one day can I make this call as a standard free user. And where can I find pricing to increase the amount of daily calls to this service?

如果有人知道用比我所尝试的更少的电话完成此任务的方法,那也将是受欢迎的知识.

Also if anyone knows of a way to accomplish this in less calls than I am attempting, that'd be welcomed knowledge as well.

推荐答案

从技术上讲,作为没有API密钥/账单信息的应用脚本用户的配额应为零.但是出于任何原因,当他们

Technically, your quota as a apps script user without API key/Billing information should be zero. But for whatever reason, Google didn't make changes to charge apps script Maps library when they changed the pricing back in June'18 for everything else related to Maps API. There seems to be a default quota, which is not explicitly mentioned in apps script documentation pages.

如果您以前有过高级计划,则可以利用 Maps.setAuthentication() .但是,如果您不这样做,

If you have had premium plan in the past, you can leverage Maps.setAuthentication(). But if you do not,

此方法不适用于API密钥.此外,请注意,高级计划不再适用于新客户.如果您还没有高级计划许可证,请不要致电setAuthentication(clientId,signingKey).您可以使用具有默认配额限额的Maps方法.

This method doesn't work with API keys. Additionally, please note that Premium Plan is no longer available for new customers. If you don't already have a Premium Plan license, please don't call setAuthentication(clientId, signingKey). You are able to use the Maps methods with the default quota allowances.

这意味着您不能扩展默认的配额限额.

Which means you cannot extend the default quota allowance.

然后您的替代方法是直接直接调用地图api 使用 "title ="显示标记为'urlfetch'的问题" rel ="tag"> urlfetch app并使用应用程序脚本原始javascript(es5)解析响应.

Your alternative would then be to call the maps api directlyskip oauth using urlfetchapp and parse the response using apps script vanilla javascript(es5).

您可以在此处查看价格.

这篇关于我一天最多可以拨打多少个服务电话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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