{"id":1508,"date":"2014-10-14T13:41:47","date_gmt":"2014-10-14T13:41:47","guid":{"rendered":"http:\/\/www.navision-blog.de\/blog\/?p=1508"},"modified":"2014-10-14T13:41:47","modified_gmt":"2014-10-14T13:41:47","slug":"retrieving-github-download-counts","status":"publish","type":"post","link":"http:\/\/www.navision-blog.de\/blog\/2014\/10\/14\/retrieving-github-download-counts\/","title":{"rendered":"Retrieving GitHub download counts"},"content":{"rendered":"<p>A couple of weeks ago we started the <a href=\"https:\/\/github.com\/fsprojects\/Paket\">Paket<\/a> project which is released on <a href=\"https:\/\/github.com\/fsprojects\/Paket\/releases\/latest\">GitHub<\/a>. Unfortunately GitHub doesn&#8217;t provide any download stats in the UI.<\/p>\n<p>A quick look at the <a href=\"https:\/\/developer.github.com\/v3\/repos\/releases\/#list-releases-for-a-repository\">REST API<\/a>\u00a0docs shows that we can retrieve the\u00a0numbers via JSON.<\/p>\n<p>So let&#8217;s open Visual Studio reference <a href=\"http:\/\/fsharp.github.io\/FSharp.Data\/library\/JsonProvider.html\">FSharp.Data<\/a> and <a href=\"http:\/\/fsharp.github.io\/FSharp.Charting\/BarAndColumnCharts.html\">FSharp.Charting<\/a>\u00a0and hack a bit with the JSON type provider:<\/p>\n<p><script src=\"https:\/\/gist.github.com\/forki\/08d36d1e79603ef12c25.js\"><\/script><\/p>\n<p>and voil\u00e0:<\/p>\n<p>&nbsp;<\/p>\n<p><img src=\"http:\/\/www.navision-blog.de\/images\/downloadstats.png\" alt=\"Paket download stats\" \/> Paket download stats<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A couple of weeks ago we started the Paket project which is released on GitHub. Unfortunately GitHub doesn&#8217;t provide any download stats in the UI. A quick look at the REST API\u00a0docs shows that we can retrieve the\u00a0numbers via JSON. So let&#8217;s open Visual Studio reference FSharp.Data and FSharp.Charting\u00a0and hack a bit with the JSON [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/posts\/1508"}],"collection":[{"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/comments?post=1508"}],"version-history":[{"count":3,"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/posts\/1508\/revisions"}],"predecessor-version":[{"id":1511,"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/posts\/1508\/revisions\/1511"}],"wp:attachment":[{"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/media?parent=1508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/categories?post=1508"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.navision-blog.de\/blog\/wp-json\/wp\/v2\/tags?post=1508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}