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

Update organizations-related GetAllForUser method docs to make it clear that only public memberships are returned #2487

Merged
merged 1 commit into from
Jul 15, 2022
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
16 changes: 12 additions & 4 deletions Octokit/Clients/IOrganizationsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,27 @@ public interface IOrganizationsClient
Task<IReadOnlyList<Organization>> GetAllForCurrent(ApiOptions options);

/// <summary>
/// Returns all <see cref="Organization" />s for the specified user.
/// Returns <see cref="Organization" />s which the specified user is a member of,
/// where the user hasn't marked their membership as private.
/// </summary>
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
/// <returns>A list of the specified user's <see cref="Organization"/>s.</returns>
/// <returns>
/// A list of the <see cref="Organization"/>s which the specified user is a member
/// of, where they haven't marked their membership as private
/// </returns>
Task<IReadOnlyList<Organization>> GetAllForUser(string user);

/// <summary>
/// Returns all <see cref="Organization" />s for the specified user.
/// Returns <see cref="Organization" />s which the specified user is a member of,
/// where the user hasn't marked their membership as private.
/// </summary>
/// <param name="user">The login of the user</param>
/// <param name="options">Options for changing the API response</param>
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
/// <returns>A list of the specified user's <see cref="Organization"/>s.</returns>
/// <returns>
/// A list of the <see cref="Organization"/>s which the specified user is a member
/// of, where they haven't marked their membership as private
/// </returns>
Task<IReadOnlyList<Organization>> GetAllForUser(string user, ApiOptions options);

/// <summary>
Expand Down
16 changes: 12 additions & 4 deletions Octokit/Clients/OrganizationsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,15 @@ public Task<IReadOnlyList<Organization>> GetAllForCurrent(ApiOptions options)
}

/// <summary>
/// Returns all <see cref="Organization" />s for the specified user.
/// Returns <see cref="Organization" />s which the specified user is a member of,
/// where the user hasn't marked their membership as private.
/// </summary>
/// <param name="user">The login of the user</param>
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
/// <returns>A list of the specified user's <see cref="Organization"/>s.</returns>
/// <returns>
/// A list of the <see cref="Organization"/>s which the specified user is a member
/// of, where they haven't marked their membership as private
/// </returns>
[ManualRoute("GET", "/users/{username}/orgs")]
public Task<IReadOnlyList<Organization>> GetAllForUser(string user)
{
Expand All @@ -99,12 +103,16 @@ public Task<IReadOnlyList<Organization>> GetAllForUser(string user)
}

/// <summary>
/// Returns all <see cref="Organization" />s for the specified user.
/// Returns <see cref="Organization" />s which the specified user is a member of,
/// where the user hasn't marked their membership as private.
/// </summary>
/// <param name="user">The login of the user</param>
/// <param name="options">Options for changing the API response</param>
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
/// <returns>A list of the specified user's <see cref="Organization"/>s.</returns>
/// <returns>
/// A list of the <see cref="Organization"/>s which the specified user is a member
/// of, where they haven't marked their membership as private
/// </returns>
[ManualRoute("GET", "/users/{username}/orgs")]
public Task<IReadOnlyList<Organization>> GetAllForUser(string user, ApiOptions options)
{
Expand Down