Interface Accounts
-
- All Known Implementing Classes:
Accounts.NotImplemented
public interface Accounts
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Accounts.NotImplemented
A default implementation which allows source compatibility when adding new methods to the interface.static class
Accounts.QueryRequest
API for setting parameters and getting result.static class
Accounts.SuggestAccountsRequest
API for setting parameters and getting result.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AccountApi
create(AccountInput input)
Create a new account.AccountApi
create(String username)
Create a new account with the given username and default options.AccountApi
id(int id)
Look up an account by ID.AccountApi
id(String id)
Look up an account by ID.Accounts.QueryRequest
query()
Query users.Accounts.QueryRequest
query(String query)
Query users.AccountApi
self()
Look up the account of the current in-scope user.Accounts.SuggestAccountsRequest
suggestAccounts()
Suggest users for a given query.Accounts.SuggestAccountsRequest
suggestAccounts(String query)
Suggest users for a given query.
-
-
-
Method Detail
-
id
AccountApi id(String id) throws RestApiException
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
AccountApi id(int id) throws RestApiException
Look up an account by ID. #id(String)See #id(String)
- Throws:
RestApiException
-
self
AccountApi self() throws RestApiException
Look up the account of the current in-scope user.- Throws:
RestApiException
- See Also:
id(String)
-
create
AccountApi create(String username) throws RestApiException
Create a new account with the given username and default options.- Throws:
RestApiException
-
create
AccountApi create(AccountInput input) throws RestApiException
Create a new account.- Throws:
RestApiException
-
suggestAccounts
Accounts.SuggestAccountsRequest suggestAccounts() throws RestApiException
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
Accounts.SuggestAccountsRequest suggestAccounts(String query) throws RestApiException
Suggest users for a given query.Shortcut API for
suggestAccounts().withQuery(String)
.- Throws:
RestApiException
- See Also:
suggestAccounts()
-
query
Accounts.QueryRequest query() throws RestApiException
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
Accounts.QueryRequest query(String query) throws RestApiException
Query users.Shortcut API for
query().withQuery(String)
.- Throws:
RestApiException
- See Also:
query()
-
-