mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-05 23:06:10 +00:00
[FEAT] Implement GetAllOrganizationMembershipsForCurrent (#2654)
This commit is contained in:
@@ -363,5 +363,28 @@ namespace Octokit.Reactive
|
||||
/// <param name="options">Options to change API behaviour</param>
|
||||
/// <returns></returns>
|
||||
IObservable<OrganizationMembershipInvitation> GetAllFailedInvitations(string org, ApiOptions options);
|
||||
|
||||
/// <summary>
|
||||
/// Returns all <see cref="OrganizationMembership" />s for the current user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://docs.github.com/en/rest/orgs/members#list-organization-memberships-for-the-authenticated-user">API Documentation</a>
|
||||
/// for more information.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <returns></returns>
|
||||
IObservable<OrganizationMembership> GetAllOrganizationMembershipsForCurrent();
|
||||
|
||||
/// <summary>
|
||||
/// Returns all <see cref="OrganizationMembership" />s for the current user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://docs.github.com/en/rest/orgs/members#list-organization-memberships-for-the-authenticated-user">API Documentation</a>
|
||||
/// for more information.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <param name="options">Options to change API behaviour</param>
|
||||
/// <returns></returns>
|
||||
IObservable<OrganizationMembership> GetAllOrganizationMembershipsForCurrent(ApiOptions options);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -506,5 +506,34 @@ namespace Octokit.Reactive
|
||||
|
||||
return _connection.GetAndFlattenAllPages<OrganizationMembershipInvitation>(ApiUrls.OrganizationFailedInvitations(org), null, options);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all <see cref="OrganizationMembership" />s for the current user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://docs.github.com/en/rest/orgs/members#list-organization-memberships-for-the-authenticated-user">API Documentation</a>
|
||||
/// for more information.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <returns></returns>
|
||||
public IObservable<OrganizationMembership> GetAllOrganizationMembershipsForCurrent()
|
||||
{
|
||||
return _connection.GetAndFlattenAllPages<OrganizationMembership>(ApiUrls.UserOrganizationMemberships());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all <see cref="OrganizationMembership" />s for the current user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// See the <a href="https://docs.github.com/en/rest/orgs/members#list-organization-memberships-for-the-authenticated-user">API Documentation</a>
|
||||
/// for more information.
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
|
||||
/// <param name="options">Options to change API behaviour</param>
|
||||
/// <returns></returns>
|
||||
public IObservable<OrganizationMembership> GetAllOrganizationMembershipsForCurrent(ApiOptions options)
|
||||
{
|
||||
return _connection.GetAndFlattenAllPages<OrganizationMembership>(ApiUrls.UserOrganizationMemberships(), options);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user