Page 1 of 1

web API for most recent build

Posted: Tue Jul 28, 2015 3:47 am
by stib
It would be great if there was an API for your website that made it easy to automate the process of finding the most recent build and downloading it.

I'm kludging together a script that scrapes the info from the site, but it would be a lot easier and more reliable if there was something that returned some JSON or XML with the build ID of the current version, and the download address for each flavour of build.

The RSS feed is close, but you still have to extract the build target and download address from the text body. You could add additional key/value pairs in the feed xml eg

Code: Select all

<Win32Static>http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20150726-git-b16b8c8-win32-static.7z</Win32static>
<Win32Shared>http://ffmpeg.zeranoe.com/builds/win32/shared/ffmpeg-20150726-git-b16b8c8-win32-shared.7z</Win32static>
etc… and that would work perfectly


Thanks for the good work

Re: web API for most recent build

Posted: Tue Jul 28, 2015 10:55 pm
by svnpenn

Re: web API for most recent build

Posted: Thu Jul 30, 2015 2:19 am
by stib
The only problem is that URL doesn't return the date of the last build. If I write something that checks whether there's a new build, it needs to know the date it was built. I'm suggesting a function that simply returns the date and location of each build, so a URL like

Code: Select all

http://ffmpeg.zeranoe.com/latestbuild&arch=64&type=static
returns some XML like:

Code: Select all

<latest build>ffmpeg-20150729-git-9ec17e4</latest build>
<build date>28-Jul-2015 22:18</build date>
<address>http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20150729-git-9ec17e4-win64-static.7z</address>
(or the equivalent in JSON)

Re: web API for most recent build

Posted: Thu Jul 30, 2015 2:43 am
by svnpenn
Stop trying to reinvent the wheel.

Code: Select all

curl --time-cond 20150729 <url>

Re: web API for most recent build

Posted: Sun Aug 02, 2015 2:51 pm
by stib
Awesome. One day I will put on a pot of coffee, sit down and actually read all of the curl man page.