如何在App Maker中创建Rest API? [英] How to create a rest api in app maker?

查看:64
本文介绍了如何在App Maker中创建Rest API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在App Maker的服务器端脚本中创建REST API?

Is there a way to create a REST API in a server side script in app maker?

我需要从iOS应用程序中调用服务器端函数,并传递一些参数并做出响应,而不必转到应用程序中的页面.

I need to call a server side function from an iOS app passing some parameters and have a response without having to go to a page in the app.

我知道对于常规的Google应用脚本来说,可以通过Execution API来实现,但是我不知道如何在应用制造商内部使用它.

I know that for regular google apps script it’s possible trough the Execution API but I don’t know how to do it inside app maker.

谢谢.

推荐答案

TL; DR

您目前无法通过Execution API使用App Maker

You cannot use App Maker via Execution API at this time

我尝试将App Script Execution API与App Maker一起使用,这是我的发现:

I tried to use App Script Execution API with App Maker and here are my findings:

  • 您可以在Google Cloud Console中为App Maker应用程序部署启用Execution API,只需转到设置"->部署"->选择部署"->查看日志"(这些步骤会将您导航到关联的Cloud Project),然后按照这些说明来启用API本身并创建凭据:

  • You can enable Execution API for App Maker app deployment in Google Cloud Console, just go to Settings -> Deployments -> Select deployment -> View Logs (these steps will navigate you to associated Cloud Project), then follow these instructions to enable API itself and create credentials:

下一步是将App Maker和Execution API相结合的交易突破...要使用App Script app作为API,您需要将其部署为"API可执行文件",但是App Maker会将其部署发布为"Web app". ..我不确定,是否可以同时将App Script应用程序发布为网络应用程序"和"API可执行文件",但是即使有可能,App Maker暂时不允许您这样做.

Next goes deal breaker for combining App Maker and Execution API... To use App Script app as API you need to deploy it as 'API executable', but App Maker publishes its deployments as 'web app'... I'm not sure, if one can have App Script app simultaneously published both as 'web app' and 'API executable', but even if it is possible App Maker doesn't allow you do it at this time.

这篇关于如何在App Maker中创建Rest API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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