API 到 return WordPress、Magento CE、Drupal 的最新版本号可用吗?

API to return newest version number of WordPress, Magento CE, Drupal available?

我想知道是否有人知道 API 我可以以编程方式使用 return 最新 stable/publically 常用网络平台(如 Wordpress、Magento CE)的可用核心版本号,和 Drupal。

例如,在问这个问题时,说 API 可能 return Wordpress 4.2.1 和 Magento 1.9.1.1 等

我读过一些像 https://wordpress.org/support/topic/programmatically-check-latest-wp-release 这样的帖子,这些帖子建议我可以将文件的最新可下载版本的文件名解析为 return 版本号,但我希望以获得更简单的解决方案!

谢谢

我认为您应该可以使用 bower 来完成此操作。

比如我运行 bower info wordpress 并得到以下输出:

{
  name: 'wordpress',
  homepage: 'https://github.com/WordPress/WordPress',
  version: '4.2.1'
}

Available versions:
  - 4.2.1
  - 4.1.4
  - 4.1.3
  - 4.1.2
  - 4.1.1
  - 4.0.4...

用您最喜欢的语言围绕它编写一个简单的脚本以获取顶级版本,然后就可以了。

对于 wordpress,您可以使用此 api:

http://api.wordpress.org/core/version-check/1.7/?version=3.9.1

要解析的示例代码:

$a = file_get_contents('http://api.wordpress.org/core/version-check/1.7/?version=3.9.1');
$a = json_decode($a);

echo $a->offers[0]->current;

关于 drupal cms 试试这个:

http://updates.drupal.org/release-history/drupal/7.x
http://updates.drupal.org/release-history/drupal/8.x

关于 MagentoCE 尝试解析此文件:

http://notifications.magentocommerce.com/community/notifications.rss

模式将是:Magento Community Edition [VERSION] 可用