add func to DownloadReleaseAttachment #609

Closed
edieruby wants to merge 7 commits from edieruby/go-sdk:download.attachment into main
Showing only changes of commit 424487f641 - Show all commits

View File

@ -110,6 +110,7 @@ func (c *Client) DeleteReleaseAttachment(user, repo string, release, id int64) (
return resp, err
}
// DownloadReleaseAttachment Download an Attachment of the Release by UUID
func (c *Client) DownloadReleaseAttachment(UUID string) ([]byte, *Response, error) {
6543 marked this conversation as resolved Outdated
Outdated
Review

A io.Reader return parameter maybe better?

A `io.Reader` return parameter maybe better?

I will update it.

I will update it.
if err := escapeValidatePathSegments(&UUID); err != nil {
6543 marked this conversation as resolved
Review

asap there is an official api ... we could add this here instead and use the old method only as fallback

asap there is an official api ... we could add this here instead and use the old method only as fallback
return nil, nil, err