Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NuGetClientV3

A client for v3 of the NuGet API.

Hierarchy

Index

Constructors

constructor

Properties

autoCompleteApiUrls

autoCompleteApiUrls: string[]

The URLs for API end-points used by the client.

defaultPageSize

defaultPageSize: number = 10

The maximum number of results to return.

Accessors

apiVersion

  • get apiVersion(): NuGetApiVersion.Unknown | NuGetApiVersion.V2 | NuGetApiVersion.V3

Methods

getAvailablePackageVersions

  • getAvailablePackageVersions(packageId: string, pageSize?: number): Promise<string[]>
  • Get available versions for the specified package.

    Parameters

    • packageId: string

      The Id of the target package.

    • Optional pageSize: number

    Returns Promise<string[]>

    A promise that resolves to all suggested package versions.

suggestPackageIds

  • suggestPackageIds(partialId: string, pageSize?: number): Promise<string[]>
  • Provide suggestions to complete a package Id.

    Parameters

    • partialId: string

      The partial package Id on which the suggestions will be based.

    • Optional pageSize: number

    Returns Promise<string[]>

    A promise that resolves to all suggested package Ids.

Static createFromIndex

  • Create a new v3 API client from the NuGet v3 API index.

    Parameters

    • Optional apiIndexURL: string

      The URL of the API index to use (defaults to defaultIndexURLV3).

    Returns Promise<NuGetClientV3>

Generated using TypeDoc