Interface Accounts
- All Known Implementing Classes:
Accounts.NotImplemented
public interface Accounts
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
A default implementation which allows source compatibility when adding new methods to the interface.static class
API for setting parameters and getting result.static class
API for setting parameters and getting result. -
Method Summary
Modifier and TypeMethodDescriptioncreate
(AccountInput input) Create a new account.Create a new account with the given username and default options.id
(int id) Look up an account by ID.Look up an account by ID.query()
Query users.Query users.self()
Look up the account of the current in-scope user.Suggest users for a given query.suggestAccounts
(String query) Suggest users for a given query.
-
Method Details
-
id
Look up an account by ID.Note: This method eagerly reads the account. Methods that mutate the account do not necessarily re-read the account. Therefore, calling a getter method on an instance after calling a mutation method on that same instance is not guaranteed to reflect the mutation. It is not recommended to store references to
AccountApi
instances.- Parameters:
id
- any identifier supported by the REST API, including numeric ID, email, or username.- Returns:
- API for accessing the account.
- Throws:
RestApiException
- if an error occurred.
-
id
Look up an account by ID. #id(String)See #id(String)
- Throws:
RestApiException
-
self
Look up the account of the current in-scope user.- Throws:
RestApiException
- See Also:
-
create
Create a new account with the given username and default options.- Throws:
RestApiException
-
create
Create a new account.- Throws:
RestApiException
-
suggestAccounts
Suggest users for a given query.Example code:
suggestAccounts().withQuery("Reviewer").withLimit(5).get()
- Returns:
- API for setting parameters and getting result.
- Throws:
RestApiException
-
suggestAccounts
Suggest users for a given query.Shortcut API for
suggestAccounts().withQuery(String)
.- Throws:
RestApiException
- See Also:
-
query
Query users.Example code:
query().withQuery("name:John email:example.com").withLimit(5).get()
- Returns:
- API for setting parameters and getting result.
- Throws:
RestApiException
-
query
Query users.Shortcut API for
query().withQuery(String)
.- Throws:
RestApiException
- See Also:
-