Documentation ¶
Overview ¶
Package npm implements functions for iteracting with the npm registry
Index ¶
Constants ¶
View Source
const (
BaseURL = "https://registry.npmjs.org"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
NewClient creates a new API client from an *http.Client. Pass nil to use http.DefaultClient
func (*Client) GetPackage ¶
GetPackage makes an HTTP request to https://registry.npmjs.org/<<packageName>> and returns the JSON response
func (*Client) GetPackageVersion ¶
func (c *Client) GetPackageVersion(ctx context.Context, packageName, version string) ([]byte, error)
GetPackageVersion makes an HTTP request to https://registry.npmjs.org/<<packageName>>/<<version>> and returns the JSON response
type GetPackage ¶
type GetPackage struct{ *Client }
func (*GetPackage) Args ¶
func (f *GetPackage) Args() int
func (*GetPackage) Deterministic ¶
func (f *GetPackage) Deterministic() bool
Click to show internal directories.
Click to hide internal directories.