Skip to content

Commit

Permalink
Update organizations-related GetAllForUser method docs to make it c…
Browse files Browse the repository at this point in the history
…lear that only public memberships are returned

Fixes #2470.
  • Loading branch information
timrogers committed Jul 15, 2022
1 parent ab1331a commit 96a877d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
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

0 comments on commit 96a877d

Please sign in to comment.