1
0
Fork 0
forked from forgejo/forgejo

Add support for Chocolatey/NuGet v2 API (#21393)

Fixes #21294

This PR adds support for NuGet v2 API.

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
KN4CK3R 2022-10-13 12:19:39 +02:00 committed by GitHub
parent c35531dd11
commit 0e58201d1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 850 additions and 135 deletions

View file

@ -26,3 +26,8 @@ func (l *linkBuilder) GetRegistrationLeafURL(id, version string) string {
func (l *linkBuilder) GetPackageDownloadURL(id, version string) string {
return fmt.Sprintf("%s/package/%s/%s/%s.%s.nupkg", l.Base, id, version, id, version)
}
// GetPackageMetadataURL builds the package metadata url
func (l *linkBuilder) GetPackageMetadataURL(id, version string) string {
return fmt.Sprintf("%s/Packages(Id='%s',Version='%s')", l.Base, id, version)
}