OpenTAP 9.27
API Reference
Public Member Functions | Public Attributes | Properties | List of all members
OpenTap.Package.HttpPackageRepository Class Reference

Implements a IPackageRepository that queries a server for OpenTAP packages via http/https. More...

Inheritance diagram for OpenTap.Package.HttpPackageRepository:
OpenTap.Package.IPackageRepository

Public Member Functions

 HttpPackageRepository (string url)
 Initialize a http repository with the given URL More...
 
void DownloadPackage (IPackageIdentifier package, string destination, CancellationToken cancellationToken)
 Download a package to a specific destination More...
 
string[] GetPackageNames (CancellationToken cancellationToken, params IPackageIdentifier[] compatibleWith)
 Get the names of the available packages in the repository. Unlisted packages are not included More...
 
string[] GetPackageNames (string @class, CancellationToken cancellationToken, params IPackageIdentifier[] compatibleWith)
 Get the names of the available packages in the repository with the specified class More...
 
PackageVersion[] GetPackageVersions (string packageName, CancellationToken cancellationToken, params IPackageIdentifier[] compatibleWith)
 Get the available versions of packages with name 'packageName' and optionally compatible with a list of packages More...
 
PackageDef[] GetPackages (PackageSpecifier package, CancellationToken cancellationToken, params IPackageIdentifier[] compatibleWith)
 Get the available versions of packages matching 'package' and optionally compatible with a list of packages More...
 
PackageDef[] CheckForUpdates (IPackageIdentifier[] packages, CancellationToken cancellationToken)
 Query the repository for updated versions of specified packages More...
 
JObject Query (string query)
 Send the GraphQL query string to the repository. More...
 
string QueryGraphQL (string query)
 Send the GraphQL query string to the repository. More...
 
override string ToString ()
 Creates a display friendly string of this.
 

Public Attributes

bool IsSilent
 If true, most warnings will be logged as debug messages
 
string UpdateId
 Get Client ID
 

Properties

SemanticVersion Version [get]
 Get or set the version of the repository
 
string Url [getset]
 Get the URL of the repository
 
- Properties inherited from OpenTap.Package.IPackageRepository
string Url [get]
 The url of the repository.
 

Detailed Description

Implements a IPackageRepository that queries a server for OpenTAP packages via http/https.

Constructor & Destructor Documentation

◆ HttpPackageRepository()

OpenTap.Package.HttpPackageRepository.HttpPackageRepository ( string  url)
inline

Initialize a http repository with the given URL

Parameters
url

Member Function Documentation

◆ CheckForUpdates()

PackageDef[] OpenTap.Package.HttpPackageRepository.CheckForUpdates ( IPackageIdentifier[]  packages,
CancellationToken  cancellationToken 
)
inline

Query the repository for updated versions of specified packages

Parameters
packages
cancellationToken
Returns

Implements OpenTap.Package.IPackageRepository.

◆ DownloadPackage()

void OpenTap.Package.HttpPackageRepository.DownloadPackage ( IPackageIdentifier  package,
string  destination,
CancellationToken  cancellationToken 
)
inline

Download a package to a specific destination

Parameters
package
destination
cancellationToken

Implements OpenTap.Package.IPackageRepository.

◆ GetPackageNames() [1/2]

string[] OpenTap.Package.HttpPackageRepository.GetPackageNames ( CancellationToken  cancellationToken,
params IPackageIdentifier[]  compatibleWith 
)
inline

Get the names of the available packages in the repository. Unlisted packages are not included

Parameters
cancellationToken
compatibleWith
Returns
Exceptions
Exception

Implements OpenTap.Package.IPackageRepository.

◆ GetPackageNames() [2/2]

string[] OpenTap.Package.HttpPackageRepository.GetPackageNames ( string @  class,
CancellationToken  cancellationToken,
params IPackageIdentifier[]  compatibleWith 
)
inline

Get the names of the available packages in the repository with the specified class

Returns
Exceptions
Exception

◆ GetPackages()

PackageDef[] OpenTap.Package.HttpPackageRepository.GetPackages ( PackageSpecifier  package,
CancellationToken  cancellationToken,
params IPackageIdentifier[]  compatibleWith 
)
inline

Get the available versions of packages matching 'package' and optionally compatible with a list of packages

Parameters
package
cancellationToken
compatibleWith
Returns

Implements OpenTap.Package.IPackageRepository.

◆ GetPackageVersions()

PackageVersion[] OpenTap.Package.HttpPackageRepository.GetPackageVersions ( string  packageName,
CancellationToken  cancellationToken,
params IPackageIdentifier[]  compatibleWith 
)
inline

Get the available versions of packages with name 'packageName' and optionally compatible with a list of packages

Parameters
packageName
cancellationToken
compatibleWith
Returns

Implements OpenTap.Package.IPackageRepository.

◆ Query()

JObject OpenTap.Package.HttpPackageRepository.Query ( string  query)
inline

Send the GraphQL query string to the repository.

Parameters
queryA GraphQL query string
Returns
A JObject containing the GraphQL response

◆ QueryGraphQL()

string OpenTap.Package.HttpPackageRepository.QueryGraphQL ( string  query)

Send the GraphQL query string to the repository.

Parameters
queryA GraphQL query string
Returns
A JSON string containing the GraphQL response

OpenTAP 9.27 API built Wed Nov 27 2024 13:14:46