-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Adding Packages Api #2551
Adding Packages Api #2551
Conversation
…observables to finish!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time to add this ❤️ I've reviewed commit-by-commit and it looks good to me from an API and basic implementation perspective, but I'm not a .NET expert, so let's wait for @nickfloyd to return from holiday before we merge (if that's okay!).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this all looks fantastic @JonruAlveus - other than the typos, this looks g2g! ❤️
{ | ||
public interface IObservablePackagesClient | ||
{ | ||
IObservablePackageVersionsClient PackageVersions { get; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is one of those weird API domains where package versions are a subset of packages, yet a package version is a package.
What you've done here feels like it works - I'm glad you approached the relationship this way to help reduce namespace confusion - I think leaving PackageVersions out of this interface would've made things a bit more clumsy.
github.Packages.PackageVersions.GetAllForUser
github.Packages.GetAllForOrg
feels more elegant than something like (though possible):
github.PackageVersions.GetAllForUser
github.Packages.GetAllForOrg
While, as you've implemented, it can lead to a bit more verbose API call, I think the expression feels more natural ❤️ solid work here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! It is a little odd. I took my inspiration from the GitHub Api docs where it's all grouped together in one Packages section.
I've just pushed a final fix for the typos also.
release_notes: Added Packages and Package versions APIs |
fixes #2360