mirror of
https://github.com/gabrie30/ghorg.git
synced 2025-08-14 02:07:11 +02:00
16 lines
485 B
Go
16 lines
485 B
Go
package bitbucket
|
|
|
|
type Downloads struct {
|
|
c *Client
|
|
}
|
|
|
|
func (dl *Downloads) Create(do *DownloadsOptions) (interface{}, error) {
|
|
urlStr := dl.c.requestUrl("/repositories/%s/%s/downloads", do.Owner, do.RepoSlug)
|
|
return dl.c.executeFileUpload("POST", urlStr, do.FilePath, do.FileName)
|
|
}
|
|
|
|
func (dl *Downloads) List(do *DownloadsOptions) (interface{}, error) {
|
|
urlStr := dl.c.requestUrl("/repositories/%s/%s/downloads", do.Owner, do.RepoSlug)
|
|
return dl.c.execute("GET", urlStr, "")
|
|
}
|