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

I’m wondering if anyone knows of an API I can use to programmatically return the newest stable/publically available core version number of common web platforms like WordPress, Magento CE, and Drupal.

For instance, as of asking this question, said API might return WordPress 4.2.1 and Magento 1.9.1.1, etc

Read More

I’ve read a few posts like https://wordpress.org/support/topic/programmatically-check-latest-wp-release that suggest I might be able to parse the file name of the newest downloadable version of files to return version numbers, but I’m hoping for an easier solution!

Thanks

Related posts

Leave a Reply

2 comments

  1. For wordpress you can use this api:

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

    example code to parse:

    $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;
    

    About drupal cms try this:

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

    About MagentoCE try parse this file:

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

    the pattern wil be: Magento Community Edition [VERSION] is available

  2. I think you should be able to use bower for this.

    For example, I ran
    bower info wordpress and got the following output:

    {
      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...
    

    Wrap a simple script around that in your favorite language to grab the top version, and there you go.