php - 我如何在 PHP 中使用 FundAmerica RESTful API?

标签 php rest

我正在尝试使用 FundAmerica休息API。可以找到文档 here ,但我不明白如何使用它。我找到了一个 library在 Github 上,但是当我尝试使用它时看到很多错误:

Strict Standards: Declaration of ACHToken::delete() should be compatible with that of APIResource::delete()

Strict Standards: Declaration of ACHToken::find() should be compatible with that of APIResource::find()

有人可以向我解释一下我该怎么做吗:

  • 使用库时要避免这些错误吗?
  • 在不使用库的情况下在 PHP 中使用 API?

此外,有人可以解释一下这是什么意思吗:

curl https://apps.fundamerica.com/api/example_objects \
-u 7Tft-uNlLJtgJezak2ywLINr7qHFa18i: \
-X POST \
-d name='OBJECT NAME'

最佳答案

您实际上不需要为此使用库 - 只需将请求(通过 cURLXMLHttpRequest 或其他方式)发送到相关 URL(例如 https://sandbox.fundamerica.com/api/offerings )和相关参数 (例如 amount='5000000')。

如果您使用的是 PHP,则 http_request()功能似乎是你需要的。

关于php - 我如何在 PHP 中使用 FundAmerica RESTful API?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29180161/

相关文章:

php - 解析日期字符串

php 邮件有时显示符号

ruby-on-rails - Rails respond_with 输出 json 并尝试将其作为方法调用

rest - 将 WSO2 esb 与在 Tomcat 上运行的 Rest Web 服务一起使用

java - 在没有 Web.xml 的 JAX-RS 上使用 Shiro 过滤器

php - Ubuntu PHP href 链接不工作

php - Smarty 表偶数

header - 如何使用 PHP 邮件隐藏 X-PHP-Script header ?

java - 我如何在没有存储库的情况下实现分页休息 Spring

javascript - 如何显示来自 REST API Controller 的错误消息以显示在 Angularjs UI 上?