using System; using System.Diagnostics.CodeAnalysis; using System.Reactive; namespace Octokit.Reactive { /// /// A client for GitHub's User Administration API (GitHub Enterprise) /// /// /// See the Administration API documentation for more details. /// public interface IObservableUserAdministrationClient { /// /// Create a new user (must be Site Admin user). /// /// /// See the API documentation /// for more information. /// /// The object describing the user to create /// The created object IObservable Create(NewUser newUser); /// /// Rename an existing user (must be Site Admin user). /// /// /// See the API documentation /// for more information. /// Note that this queues a request to rename a user, rather than execute it straight away /// /// The username to rename /// The request, specifying the new login /// A object indicating the queued task message and Url to the user IObservable Rename(string login, UserRename userRename); /// /// Create an impersonation OAuth token (must be Site Admin user). /// /// /// See the API documentation /// for more information. /// /// The user to impersonate /// The request specifying the required scopes /// An object containing the impersonation token IObservable CreateImpersonationToken(string login, NewImpersonationToken newImpersonationToken); /// /// Deletes an impersonation OAuth token (must be Site Admin user). /// /// /// See the API documentation /// for more information. /// /// The user to remove impersonation token from /// IObservable DeleteImpersonationToken(string login); /// /// Promotes ordinary user to a site administrator (must be Site Admin user). /// /// /// See the API documentation /// for more information. /// /// The user to promote to administrator. /// IObservable Promote(string login); /// /// Demotes a site administrator to an ordinary user (must be Site Admin user). /// /// /// See the API documentation /// for more information. /// /// The user to demote from administrator. /// IObservable Demote(string login); /// /// Suspends a user (must be Site Admin user). /// /// /// See the API documentation /// for more information. /// /// The user to suspend. /// IObservable Suspend(string login); /// /// Unsuspends a user (must be Site Admin user). /// /// /// See the API documentation /// for more information. /// /// The user to unsuspend. /// IObservable Unsuspend(string login); /// /// List all public keys (must be Site Admin user). /// /// /// See the API documentation /// for more information. /// /// IObservable ListAllPublicKeys(); /// /// Delete a user (must be Site Admin user). /// /// /// See the API documentation /// for more information. /// /// The user to delete /// IObservable Delete(string login); /// /// Delete a public key (must be Site Admin user). /// /// /// See the API documentation /// for more information. /// /// The key to delete /// IObservable DeletePublicKey(int keyId); } }