Cannot get browser_download_url via Github API?












0















Let's say, I'm looking at https://github.com/jgm/pandoc/releases :



github-pandoc



I want to use the Github API to get the latest released zip - so I try to use the following, and it works:



$ curl --silent "https://api.github.com/repos/jgm/pandoc/releases/latest" | grep "browser_download_url" | grep zip
"browser_download_url": "https://github.com/jgm/pandoc/releases/download/2.4/pandoc-2.4-macOS.zip"
"browser_download_url": "https://github.com/jgm/pandoc/releases/download/2.4/pandoc-2.4-windows-i386.zip"
"browser_download_url": "https://github.com/jgm/pandoc/releases/download/2.4/pandoc-2.4-windows-x86_64.zip"
$ curl --silent "https://api.github.com/repos/jgm/pandoc/releases/latest" | grep "zipball_url"
"zipball_url": "https://api.github.com/repos/jgm/pandoc/zipball/2.4",


There is zipball_url, but I don't want to use it, because it doesn't have a proper filename.



So far, so good. Now I want to do the same for the https://github.com/hakimel/reveal.js/releases repo :



github-revealjs



Online, it looks sort of the same, doesn't it? There's "Assets", there's files that can be downloaded... But, if I try the same:



$ curl --silent "https://api.github.com/repos/hakimel/reveal.js/releases/latest" | grep "browser_download_url"
$
$ curl --silent "https://api.github.com/repos/hakimel/reveal.js/releases/latest" | grep "zipball_url"
"zipball_url": "https://api.github.com/repos/hakimel/reveal.js/zipball/3.7.0",


... turn's out, browser_download_url does not exist here?! Why? There is a https://github.com/hakimel/reveal.js/archive/3.7.0.zip on the Github page for this project?



Is this because the hakimel/reveal.js is a "Source code" .zip of a tagged Git source; and the jgm/pandoc has browser_download_url for those .zip that are "manually uploaded" (i.e. not derived automatically from the tagged version of the Git source)?



If so, can I get (and if so, how) the https://github.com/hakimel/reveal.js/archive/3.7.0.zip link (or whatever is the latest official zip version) from the Github API directly, without having to perform regex acrobatics based on latest tag releases to find the actual .zip filename?



Edit: note that here, 3.7.0.zip is not the final filename that you get if you click it in a browser - the final filename ends up being reveal.js-3.7.0.zip!










share|improve this question



























    0















    Let's say, I'm looking at https://github.com/jgm/pandoc/releases :



    github-pandoc



    I want to use the Github API to get the latest released zip - so I try to use the following, and it works:



    $ curl --silent "https://api.github.com/repos/jgm/pandoc/releases/latest" | grep "browser_download_url" | grep zip
    "browser_download_url": "https://github.com/jgm/pandoc/releases/download/2.4/pandoc-2.4-macOS.zip"
    "browser_download_url": "https://github.com/jgm/pandoc/releases/download/2.4/pandoc-2.4-windows-i386.zip"
    "browser_download_url": "https://github.com/jgm/pandoc/releases/download/2.4/pandoc-2.4-windows-x86_64.zip"
    $ curl --silent "https://api.github.com/repos/jgm/pandoc/releases/latest" | grep "zipball_url"
    "zipball_url": "https://api.github.com/repos/jgm/pandoc/zipball/2.4",


    There is zipball_url, but I don't want to use it, because it doesn't have a proper filename.



    So far, so good. Now I want to do the same for the https://github.com/hakimel/reveal.js/releases repo :



    github-revealjs



    Online, it looks sort of the same, doesn't it? There's "Assets", there's files that can be downloaded... But, if I try the same:



    $ curl --silent "https://api.github.com/repos/hakimel/reveal.js/releases/latest" | grep "browser_download_url"
    $
    $ curl --silent "https://api.github.com/repos/hakimel/reveal.js/releases/latest" | grep "zipball_url"
    "zipball_url": "https://api.github.com/repos/hakimel/reveal.js/zipball/3.7.0",


    ... turn's out, browser_download_url does not exist here?! Why? There is a https://github.com/hakimel/reveal.js/archive/3.7.0.zip on the Github page for this project?



    Is this because the hakimel/reveal.js is a "Source code" .zip of a tagged Git source; and the jgm/pandoc has browser_download_url for those .zip that are "manually uploaded" (i.e. not derived automatically from the tagged version of the Git source)?



    If so, can I get (and if so, how) the https://github.com/hakimel/reveal.js/archive/3.7.0.zip link (or whatever is the latest official zip version) from the Github API directly, without having to perform regex acrobatics based on latest tag releases to find the actual .zip filename?



    Edit: note that here, 3.7.0.zip is not the final filename that you get if you click it in a browser - the final filename ends up being reveal.js-3.7.0.zip!










    share|improve this question

























      0












      0








      0








      Let's say, I'm looking at https://github.com/jgm/pandoc/releases :



      github-pandoc



      I want to use the Github API to get the latest released zip - so I try to use the following, and it works:



      $ curl --silent "https://api.github.com/repos/jgm/pandoc/releases/latest" | grep "browser_download_url" | grep zip
      "browser_download_url": "https://github.com/jgm/pandoc/releases/download/2.4/pandoc-2.4-macOS.zip"
      "browser_download_url": "https://github.com/jgm/pandoc/releases/download/2.4/pandoc-2.4-windows-i386.zip"
      "browser_download_url": "https://github.com/jgm/pandoc/releases/download/2.4/pandoc-2.4-windows-x86_64.zip"
      $ curl --silent "https://api.github.com/repos/jgm/pandoc/releases/latest" | grep "zipball_url"
      "zipball_url": "https://api.github.com/repos/jgm/pandoc/zipball/2.4",


      There is zipball_url, but I don't want to use it, because it doesn't have a proper filename.



      So far, so good. Now I want to do the same for the https://github.com/hakimel/reveal.js/releases repo :



      github-revealjs



      Online, it looks sort of the same, doesn't it? There's "Assets", there's files that can be downloaded... But, if I try the same:



      $ curl --silent "https://api.github.com/repos/hakimel/reveal.js/releases/latest" | grep "browser_download_url"
      $
      $ curl --silent "https://api.github.com/repos/hakimel/reveal.js/releases/latest" | grep "zipball_url"
      "zipball_url": "https://api.github.com/repos/hakimel/reveal.js/zipball/3.7.0",


      ... turn's out, browser_download_url does not exist here?! Why? There is a https://github.com/hakimel/reveal.js/archive/3.7.0.zip on the Github page for this project?



      Is this because the hakimel/reveal.js is a "Source code" .zip of a tagged Git source; and the jgm/pandoc has browser_download_url for those .zip that are "manually uploaded" (i.e. not derived automatically from the tagged version of the Git source)?



      If so, can I get (and if so, how) the https://github.com/hakimel/reveal.js/archive/3.7.0.zip link (or whatever is the latest official zip version) from the Github API directly, without having to perform regex acrobatics based on latest tag releases to find the actual .zip filename?



      Edit: note that here, 3.7.0.zip is not the final filename that you get if you click it in a browser - the final filename ends up being reveal.js-3.7.0.zip!










      share|improve this question














      Let's say, I'm looking at https://github.com/jgm/pandoc/releases :



      github-pandoc



      I want to use the Github API to get the latest released zip - so I try to use the following, and it works:



      $ curl --silent "https://api.github.com/repos/jgm/pandoc/releases/latest" | grep "browser_download_url" | grep zip
      "browser_download_url": "https://github.com/jgm/pandoc/releases/download/2.4/pandoc-2.4-macOS.zip"
      "browser_download_url": "https://github.com/jgm/pandoc/releases/download/2.4/pandoc-2.4-windows-i386.zip"
      "browser_download_url": "https://github.com/jgm/pandoc/releases/download/2.4/pandoc-2.4-windows-x86_64.zip"
      $ curl --silent "https://api.github.com/repos/jgm/pandoc/releases/latest" | grep "zipball_url"
      "zipball_url": "https://api.github.com/repos/jgm/pandoc/zipball/2.4",


      There is zipball_url, but I don't want to use it, because it doesn't have a proper filename.



      So far, so good. Now I want to do the same for the https://github.com/hakimel/reveal.js/releases repo :



      github-revealjs



      Online, it looks sort of the same, doesn't it? There's "Assets", there's files that can be downloaded... But, if I try the same:



      $ curl --silent "https://api.github.com/repos/hakimel/reveal.js/releases/latest" | grep "browser_download_url"
      $
      $ curl --silent "https://api.github.com/repos/hakimel/reveal.js/releases/latest" | grep "zipball_url"
      "zipball_url": "https://api.github.com/repos/hakimel/reveal.js/zipball/3.7.0",


      ... turn's out, browser_download_url does not exist here?! Why? There is a https://github.com/hakimel/reveal.js/archive/3.7.0.zip on the Github page for this project?



      Is this because the hakimel/reveal.js is a "Source code" .zip of a tagged Git source; and the jgm/pandoc has browser_download_url for those .zip that are "manually uploaded" (i.e. not derived automatically from the tagged version of the Git source)?



      If so, can I get (and if so, how) the https://github.com/hakimel/reveal.js/archive/3.7.0.zip link (or whatever is the latest official zip version) from the Github API directly, without having to perform regex acrobatics based on latest tag releases to find the actual .zip filename?



      Edit: note that here, 3.7.0.zip is not the final filename that you get if you click it in a browser - the final filename ends up being reveal.js-3.7.0.zip!







      github-api github-api-v3






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 20 '18 at 10:29









      sdaausdaau

      20k28151205




      20k28151205
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390982%2fcannot-get-browser-download-url-via-github-api%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53390982%2fcannot-get-browser-download-url-via-github-api%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Tangent Lines Diagram Along Smooth Curve

          Yusuf al-Mu'taman ibn Hud

          Zucchini