跳到主要内容
博客林节点api_spec()

api_spec()

引入新的应用程序接口调用:api_spec() - 以机器可读格式生成整个 Linode 应用程序接口规范。 生成的结构包含所有 API 类和方法,还包括方法参数、参数说明、数据类型、默认值以及可能抛出的错误。

实现 API 绑定或工具时的一个常见问题是,最终会重复相同的类、方法、属性、类型验证和错误处理--这既繁琐又容易出错,而且不修改代码就无法接收新的 API 方法或参数。

通过提供机器可读格式的应用程序接口规范,可以编写工具来检索结构,并根据结构的内容动态实现应用程序接口。 无需对方法进行硬编码。 无需对参数进行硬编码。 没有比特码

该电话不需要授权。

享受吧!
-冯小刚


评论 (2)

  1. Author Photo

    Nice, I’ll have to check this out. Perhaps it will make writing a Drupal module easier, as well as implimenting custom php functions to call and validate Linode api calls.

  2. Author Photo

    Anything that makes writing Drupal modules easier has to be a good thing 🙂

    Good job folks, I will find that handy in the coming months of development!

留下回复

您的电子邮件地址将不会被公布。 必须填写的字段被标记为*