Handbook
Glossary
github-sha-file-meta-and-contents ( owner repo sha path -- meta/f contents/f )
Vocabulary
github
Inputs
owner
an
object
repo
an
object
sha
an
object
path
an
object
Outputs
meta/f
an
object
contents/f
an
object
Definition
USING:
accessors
assocs
combinators.short-circuit
continuations
formatting
http.client
kernel
;
IN:
github
:
github-sha-file-meta-and-contents
( owner repo sha path -- meta/f contents/f )
[
swap
"/repos/%s/%s/contents/%s?ref=%s"
sprintf
github-get
dup
"download_url"
of
http-get
nip
]
[
dup
{
[
download-failed?
]
[
response>>
code>>
404
=
]
}
1&&
[
5drop
f
f
]
[
rethrow
]
if
]
recover
;