0

My C# app needs to check for updates at http://code.google.com/p/cmissync/downloads

I could scrap the HTML, but is there a better solution?
I did not find any Google API that allows this.

Note: I don't want to maintain a text file containing the version number somewhere, because it would make the release process a bit less lean.

Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
  • realeased as in zip or could you use git/svn/hg? – j_mcnally Mar 14 '13 at 03:38
  • Not git/svn/hg, just binary files uploaded at http://code.google.com/p/cmissync/downloads – Nicolas Raoul Mar 14 '13 at 03:50
  • alot of git systems like this use tags to generate the binaries, did u consider looking at tags.... just a thought. – j_mcnally Mar 14 '13 at 03:59
  • @j_mcnally: There can be a few hours between the tag is applied and the binary is available for download, so unfortunately that strategy would fail sometimes. – Nicolas Raoul Mar 14 '13 at 04:09
  • yeah, other than scraping my ideas are exhausted sorry :( i looked for a rss/xml feed, a json end point... but it just doesnt seem to be there... also the google code data api has been deprecated.. even issue tracking api is in sunset. The only public api is for uploading. – j_mcnally Mar 14 '13 at 04:11

1 Answers1

1

I have just found an URL that returns an Atom description of the latest downloads:

https://code.google.com/feeds/p/cmissync/downloads/basic

Excerpt:

<?xml version="1.0"?>

<feed xmlns="http://www.w3.org/2005/Atom">
 <updated>2013-03-14T04:37:53Z</updated>
 <id>http://code.google.com/feeds/p/cmissync/downloads/basic</id>
 <title>Downloads for project cmissync on Google Code</title>
 <link rel="self" type="application/atom+xml;type=feed" href="http://code.google.com/feeds/p/cmissync/downloads/basic"/>
 <link rel="alternate" type="text/html" href="http://code.google.com/p/cmissync/downloads/list"/>

 <entry>
 <updated>2013-03-14T04:37:53Z</updated>
 <id>http://code.google.com/feeds/p/cmissync/downloads/basic/CmisSync_0.4.6.msi</id>
 <link rel="alternate" type="text/html" href="http://code.google.com/p/cmissync/downloads/detail?name=CmisSync_0.4.6.msi" />
 <title>
 CmisSync_0.4.6.msi (1.5 MB)
 </title>
 <author>
 <name>nicolas.raoul@gmail.com</name>
 </author>
 <content type="html">
&lt;pre&gt;
CmisSync 0.4.6

&lt;a href=&quot;http://cmissync.googlecode.com/files/CmisSync_0.4.6.msi&quot;&gt;Download&lt;/a&gt;
&lt;/pre&gt;
 </content>
</entry>


 <entry>
 [...]

Even without an Atom library, it should be easy enough to filter only the <id> elements, which gives the feed identifiers of the 100 most recent files. From these identifiers, a list of download URLs can be extrapolated:

http://code.google.com/feeds/p/cmissync/downloads/basic/CmisSync_0.4.6.msihttp://cmissync.googlecode.com/files/CmisSync_0.4.6.msi

Another easier solution is warmly welcome!

Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373