We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5898069 commit c84e492Copy full SHA for c84e492
repo_file.go
@@ -13,3 +13,11 @@ import (
13
func (c *Client) GetFile(user, repo, ref, tree string) ([]byte, error) {
14
return c.getResponse("GET", fmt.Sprintf("/repos/%s/%s/raw/%s/%s", user, repo, ref, tree), nil, nil)
15
}
16
+
17
+// GetArchive downloads the full contents of a repository. Ref can be a branch/tag/commit.
18
+func (c *Client) GetArchive(user, repo, ref, format string) ([]byte, error) {
19
+ if format != ".zip" && format != ".tar.gz" {
20
+ return nil, fmt.Errorf("invalid format: %s (must be .zip or .tar.gz)", format)
21
+ }
22
+ return c.getResponse("GET", fmt.Sprintf("/repos/%s/%s/archive/%s%s", user, repo, ref, format), nil, nil)
23
+}
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments