Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added Missing APIOption overload for PackagesClient.GetAll* #2923 #2934

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 99 additions & 3 deletions Octokit.Reactive/Clients/IObservablePackagesClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@ public interface IObservablePackagesClient
{
IObservablePackageVersionsClient PackageVersions { get; }

/// <summary>
/// List all packages for an organisations, readable by the current user
/// </summary>
/// <remarks>
/// See the <a href="https://docs.github.com/rest/packages#list-packages-for-an-organization">API documentation</a> for more details
/// </remarks>
/// <param name="org">Required: Organisation Name</param>
/// <param name="packageType">Required: The type of package</param>
IObservable<Package> GetAllForOrg(string org, PackageType packageType);

/// <summary>
/// List all packages for an organisations, readable by the current user
/// </summary>
/// <remarks>
/// See the <a href="https://docs.github.com/rest/packages#list-packages-for-an-organization">API documentation</a> for more details
/// </remarks>
/// <param name="org">Required: Organisation Name</param>
/// <param name="packageType">Required: The type of package</param>
/// <param name="options">Options for changing the API response</param>
IObservable<Package> GetAllForOrg(string org, PackageType packageType, ApiOptions options);

/// <summary>
/// List all packages for an organisations, readable by the current user
/// </summary>
Expand All @@ -16,7 +37,19 @@ public interface IObservablePackagesClient
/// <param name="org">Required: Organisation Name</param>
/// <param name="packageType">Required: The type of package</param>
/// <param name="packageVisibility">Optional: The visibility of the package</param>
IObservable<Package> GetAllForOrg(string org, PackageType packageType, PackageVisibility? packageVisibility = null);
IObservable<Package> GetAllForOrg(string org, PackageType packageType, PackageVisibility? packageVisibility);

/// <summary>
/// List all packages for an organisations, readable by the current user
/// </summary>
/// <remarks>
/// See the <a href="https://docs.github.com/rest/packages#list-packages-for-an-organization">API documentation</a> for more details
/// </remarks>
/// <param name="org">Required: Organisation Name</param>
/// <param name="packageType">Required: The type of package</param>
/// <param name="packageVisibility">Optional: The visibility of the package</param>
/// <param name="options">Options for changing the API response</param>
IObservable<Package> GetAllForOrg(string org, PackageType packageType, PackageVisibility? packageVisibility, ApiOptions options);

/// <summary>
/// Get a specific package for an Organization.
Expand Down Expand Up @@ -51,6 +84,35 @@ public interface IObservablePackagesClient
/// <param name="packageName">Required: The name of the package</param>
IObservable<Unit> RestoreForOrg(string org, PackageType packageType, string packageName);

/// <summary>
/// Lists packages owned by the authenticated user within the user's namespace
/// </summary>
/// <remarks>
/// See the <a href="https://docs.github.com/rest/packages#list-packages-for-the-authenticated-users-namespace">API documentation</a> for more details
/// </remarks>
/// <param name="packageType">Required: The type of package</param>
IObservable<Package> GetAllForActiveUser(PackageType packageType);

/// <summary>
/// Lists packages owned by the authenticated user within the user's namespace
/// </summary>
/// <remarks>
/// See the <a href="https://docs.github.com/rest/packages#list-packages-for-the-authenticated-users-namespace">API documentation</a> for more details
/// </remarks>
/// <param name="packageType">Required: The type of package</param>
/// <param name="options">Options for changing the API response</param>
IObservable<Package> GetAllForActiveUser(PackageType packageType, ApiOptions options);

/// <summary>
/// Lists packages owned by the authenticated user within the user's namespace
/// </summary>
/// <remarks>
/// See the <a href="https://docs.github.com/rest/packages#list-packages-for-the-authenticated-users-namespace">API documentation</a> for more details
/// </remarks>
/// <param name="packageType">Required: The type of package</param>
/// <param name="packageVisibility">Optional: The visibility of the package</param>
IObservable<Package> GetAllForActiveUser(PackageType packageType, PackageVisibility? packageVisibility);

/// <summary>
/// Lists packages owned by the authenticated user within the user's namespace
/// </summary>
Expand All @@ -59,7 +121,8 @@ public interface IObservablePackagesClient
/// </remarks>
/// <param name="packageType">Required: The type of package</param>
/// <param name="packageVisibility">Optional: The visibility of the package</param>
IObservable<Package> GetAllForActiveUser(PackageType packageType, PackageVisibility? packageVisibility = null);
/// <param name="options">Options for changing the API response</param>
IObservable<Package> GetAllForActiveUser(PackageType packageType, PackageVisibility? packageVisibility, ApiOptions options);

/// <summary>
/// Gets a specific package for a package owned by the authenticated user.
Expand Down Expand Up @@ -91,6 +154,38 @@ public interface IObservablePackagesClient
/// <param name="packageName">Required: The name of the package</param>
IObservable<Unit> RestoreForActiveUser(PackageType packageType, string packageName);

/// <summary>
/// Lists packages owned by the authenticated user within the user's namespace
/// </summary>
/// <remarks>
/// See the <a href="https://docs.github.com/rest/packages#list-packages-for-the-authenticated-users-namespace">API documentation</a> for more details
/// </remarks>
/// <param name="username">Required: Username</param>
/// <param name="packageType">Required: The type of package</param>
IObservable<Package> GetAllForUser(string username, PackageType packageType);

/// <summary>
/// Lists packages owned by the authenticated user within the user's namespace
/// </summary>
/// <remarks>
/// See the <a href="https://docs.github.com/rest/packages#list-packages-for-the-authenticated-users-namespace">API documentation</a> for more details
/// </remarks>
/// <param name="username">Required: Username</param>
/// <param name="packageType">Required: The type of package</param>
/// <param name="options">Options for changing the API response</param>
IObservable<Package> GetAllForUser(string username, PackageType packageType, ApiOptions options);

/// <summary>
/// Lists packages owned by the authenticated user within the user's namespace
/// </summary>
/// <remarks>
/// See the <a href="https://docs.github.com/rest/packages#list-packages-for-the-authenticated-users-namespace">API documentation</a> for more details
/// </remarks>
/// <param name="username">Required: Username</param>
/// <param name="packageType">Required: The type of package</param>
/// <param name="packageVisibility">Optional: The visibility of the package</param>
IObservable<Package> GetAllForUser(string username, PackageType packageType, PackageVisibility? packageVisibility);

/// <summary>
/// Lists packages owned by the authenticated user within the user's namespace
/// </summary>
Expand All @@ -100,7 +195,8 @@ public interface IObservablePackagesClient
/// <param name="username">Required: Username</param>
/// <param name="packageType">Required: The type of package</param>
/// <param name="packageVisibility">Optional: The visibility of the package</param>
IObservable<Package> GetAllForUser(string username, PackageType packageType, PackageVisibility? packageVisibility = null);
/// <param name="options">Options for changing the API response</param>
IObservable<Package> GetAllForUser(string username, PackageType packageType, PackageVisibility? packageVisibility, ApiOptions options);

/// <summary>
/// Gets a specific package metadata for a public package owned by a user.
Expand Down
Loading
Loading