diff --git a/Octokit.Reactive/Clients/IObservableOrganizationMembersClient.cs b/Octokit.Reactive/Clients/IObservableOrganizationMembersClient.cs index 8e5a903bc0..a327040aaa 100644 --- a/Octokit.Reactive/Clients/IObservableOrganizationMembersClient.cs +++ b/Octokit.Reactive/Clients/IObservableOrganizationMembersClient.cs @@ -304,6 +304,21 @@ public interface IObservableOrganizationMembersClient /// IObservable AddOrUpdateOrganizationMembership(string org, string user, OrganizationMembershipUpdate addOrUpdateRequest); + /// + /// Create an organization invitation for a user + /// + /// + /// This method requires authentication. + /// The authenticated user must be an organization owner. + /// See the API documentation + /// for more information. + /// + /// The login for the organization + /// An instance containing the + /// details of the organization invitation + /// + IObservable CreateOrganizationInvitation(string org, OrganizationInvitationRequest invitationRequest); + /// /// Remove a user's membership with an organization. /// diff --git a/Octokit.Reactive/Clients/ObservableOrganizationMembersClient.cs b/Octokit.Reactive/Clients/ObservableOrganizationMembersClient.cs index e258722c26..31d41f23ba 100644 --- a/Octokit.Reactive/Clients/ObservableOrganizationMembersClient.cs +++ b/Octokit.Reactive/Clients/ObservableOrganizationMembersClient.cs @@ -418,6 +418,27 @@ public IObservable AddOrUpdateOrganizationMembership(str return _client.AddOrUpdateOrganizationMembership(org, user, addOrUpdateRequest).ToObservable(); } + + /// + /// Create an organization invitation for a user + /// + /// + /// This method requires authentication. + /// The authenticated user must be an organization owner. + /// See the API documentation + /// for more information. + /// + /// The login for the organization + /// An instance containing the + /// details of the organization invitation + /// + public IObservable CreateOrganizationInvitation(string org, OrganizationInvitationRequest invitationRequest) + { + Ensure.ArgumentNotNullOrEmptyString(org, nameof(org)); + Ensure.ArgumentNotNull(invitationRequest, nameof(invitationRequest)); + + return _client.CreateOrganizationInvitation(org, invitationRequest).ToObservable(); + } /// /// Remove a user's membership with an organization.