openvsx

package
v0.0.0-...-560f09a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExtensionNotFound = fmt.Errorf("extension not found")
)

Functions

This section is empty.

Types

type BundledExtension

type BundledExtension struct {
	URL       string `json:"url"`
	Namespace string `json:"namespace"`
	Extension string `json:"extension"`
}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client

Implements the Client interface for the OpenVSX API

func NewClient

func NewClient(baseUrl string, client *http.Client) *Client

NewClient

Create a new OpenVSX API client

func (*Client) DownloadExtension

func (c *Client) DownloadExtension(extensionId string, version string) (io.ReadCloser, int64, error)

DownloadExtension

Downloads an extension

func (*Client) GetMetadata

func (c *Client) GetMetadata(extensionId string, version string) (*Extension, error)

GetMetadata

Get the metadata for an extension

type Extension

type Extension struct {
	NamespaceURL       string             `json:"namespaceUrl"`
	ReviewsURL         string             `json:"reviewsUrl"`
	Files              map[string]string  `json:"files"`
	Name               string             `json:"name"`
	Namespace          string             `json:"namespace"`
	TargetPlatform     string             `json:"targetPlatform"`
	Version            string             `json:"version"`
	PreRelease         bool               `json:"preRelease"`
	PublishedBy        Publisher          `json:"publishedBy"`
	Verified           bool               `json:"verified"`
	UnrelatedPublisher bool               `json:"unrelatedPublisher"`
	NamespaceAccess    string             `json:"namespaceAccess"`
	AllVersions        map[string]string  `json:"allVersions"`
	AllVersionsURL     string             `json:"allVersionsUrl"`
	AverageRating      float64            `json:"averageRating"`
	DownloadCount      int                `json:"downloadCount"`
	ReviewCount        int                `json:"reviewCount"`
	VersionAlias       []string           `json:"versionAlias"`
	Timestamp          string             `json:"timestamp"`
	Preview            bool               `json:"preview"`
	DisplayName        string             `json:"displayName"`
	Description        string             `json:"description"`
	Engines            map[string]string  `json:"engines"`
	Categories         []string           `json:"categories"`
	ExtensionKind      []string           `json:"extensionKind"`
	Tags               []string           `json:"tags"`
	License            string             `json:"license"`
	Homepage           string             `json:"homepage"`
	Repository         string             `json:"repository"`
	SponsorLink        string             `json:"sponsorLink"`
	Bugs               string             `json:"bugs"`
	GalleryColor       string             `json:"galleryColor"`
	GalleryTheme       string             `json:"galleryTheme"`
	LocalizedLanguages []string           `json:"localizedLanguages"`
	QnA                string             `json:"qna"`
	Dependencies       []interface{}      `json:"dependencies"`
	BundledExtensions  []BundledExtension `json:"bundledExtensions"`
	Downloads          map[string]string  `json:"downloads"`
}

type Publisher

type Publisher struct {
	LoginName string `json:"loginName"`
	FullName  string `json:"fullName"`
	AvatarURL string `json:"avatarUrl"`
	Homepage  string `json:"homepage"`
	Provider  string `json:"provider"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL