Cannot get browser_download_url via Github API?
Let's say, I'm looking at https://github.com/jgm/pandoc/releases :
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 :
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
add a comment |
Let's say, I'm looking at https://github.com/jgm/pandoc/releases :
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 :
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
add a comment |
Let's say, I'm looking at https://github.com/jgm/pandoc/releases :
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 :
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
Let's say, I'm looking at https://github.com/jgm/pandoc/releases :
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 :
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
github-api github-api-v3
asked Nov 20 '18 at 10:29
sdaausdaau
20k28151205
20k28151205
add a comment |
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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