Class GitHubPackageApi
Implements GitHub Packages operations.
Namespace: Neon.Deployment
Assembly: Neon.Deployment.dll
Syntax
public class GitHubPackageApi
Constructors
GitHubPackageApi()
Constructor.
Declaration
public GitHubPackageApi()
Methods
Delete(string, string, GitHubPackageType)
Deletes a specific named package or the packages that match a file pattern using "*" and "?" wildcards (see FileWildcardRegex(string)).
Declaration
public void Delete(string organization, string nameOrPattern, GitHubPackageType packageType = GitHubPackageType.Container)
Parameters
Type | Name | Description |
---|---|---|
string | organization | The GitHub organization name. |
string | nameOrPattern | The package name or matching pattern (see FileWildcardRegex(string)). |
GitHubPackageType | packageType | Optionally specifies the package type. This defaults to Container. |
DeleteAsync(string, string, GitHubPackageType)
Deletes a specific named package or the packages that match a file pattern using "*" and "?" wildcards (see FileWildcardRegex(string)).
Declaration
public Task DeleteAsync(string organization, string nameOrPattern, GitHubPackageType packageType = GitHubPackageType.Container)
Parameters
Type | Name | Description |
---|---|---|
string | organization | The GitHub organization name. |
string | nameOrPattern | The package name or matching pattern (see FileWildcardRegex(string)). |
GitHubPackageType | packageType | Optionally specifies the package type. This defaults to Container. |
Returns
Type | Description |
---|---|
Task |
List(string, string, GitHubPackageType, GitHubPackageVisibility)
Lists the packages for an organization.
Declaration
public List<GitHubPackage> List(string organization, string nameOrPattern = null, GitHubPackageType packageType = GitHubPackageType.Container, GitHubPackageVisibility visibility = GitHubPackageVisibility.All)
Parameters
Type | Name | Description |
---|---|---|
string | organization | The GitHub organization name. |
string | nameOrPattern | The matching pattern (see FileWildcardRegex(string)). |
GitHubPackageType | packageType | Optionally specifies the package type. This defaults to Container. |
GitHubPackageVisibility | visibility | Optionally specifies the visibility of the package. This defaults to All |
Returns
Type | Description |
---|---|
List<GitHubPackage> | The list of package information as a list of GitHubPackage instance. |
ListAsync(string, string, GitHubPackageType, GitHubPackageVisibility, bool)
Lists the packages for an organization.
Declaration
public Task<List<GitHubPackage>> ListAsync(string organization, string nameOrPattern = null, GitHubPackageType packageType = GitHubPackageType.Container, GitHubPackageVisibility visibility = GitHubPackageVisibility.All, bool includeVersions = false)
Parameters
Type | Name | Description |
---|---|---|
string | organization | The GitHub organization name. |
string | nameOrPattern | The matching pattern (see FileWildcardRegex(string)). |
GitHubPackageType | packageType | Optionally specifies the package type. This defaults to Container. |
GitHubPackageVisibility | visibility | Optionally specifies the visibility of the package. This defaults to All |
bool | includeVersions | Optionally queries for the package versions as well. This defaults to |
Returns
Type | Description |
---|---|
Task<List<GitHubPackage>> | The list of package information as a list of GitHubPackage instance. |
SetVisibility(string, string, GitHubPackageType, GitHubPackageVisibility)
Makes public a specific named package or the packages that match a file pattern using "*" and "?" wildcards (see FileWildcardRegex(string)).
note
This is not currently implemented due to the lack of a proper GitHub REST API.
Declaration
public void SetVisibility(string organization, string nameOrPattern, GitHubPackageType packageType = GitHubPackageType.Container, GitHubPackageVisibility visibility = GitHubPackageVisibility.All)
Parameters
Type | Name | Description |
---|---|---|
string | organization | The GitHub organization name. |
string | nameOrPattern | The package name or matching pattern. |
GitHubPackageType | packageType | Optionally specifies the package type. This defaults to Container. |
GitHubPackageVisibility | visibility | The new package visibility. |
Exceptions
Type | Condition |
---|---|
NotImplementedException | Currently thrown always. |
SetVisibilityAsync(string, string, GitHubPackageType, GitHubPackageVisibility)
Makes public a specific named package or the packages that match a file pattern using "*" and "?" wildcards (see FileWildcardRegex(string)).
note
This is not currently implemented due to the lack of a proper GitHub REST API.
Declaration
public Task SetVisibilityAsync(string organization, string nameOrPattern, GitHubPackageType packageType = GitHubPackageType.Container, GitHubPackageVisibility visibility = GitHubPackageVisibility.All)
Parameters
Type | Name | Description |
---|---|---|
string | organization | The GitHub organization name. |
string | nameOrPattern | The package name or matching pattern. |
GitHubPackageType | packageType | Optionally specifies the package type. This defaults to Container. |
GitHubPackageVisibility | visibility | The visibility to set the package to. |
Returns
Type | Description |
---|---|
Task |
Exceptions
Type | Condition |
---|---|
NotImplementedException | Currently thrown always. |