public interface Accounts
Modifier and Type | Interface and 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.
|
Modifier and Type | Method and 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) |
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.
|
AccountApi id(String id) throws RestApiException
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.
id
- any identifier supported by the REST API, including numeric ID, email, or username.RestApiException
- if an error occurred.AccountApi id(int id) throws RestApiException
RestApiException
id(String)
AccountApi self() throws RestApiException
RestApiException
id(String)
AccountApi create(String username) throws RestApiException
RestApiException
AccountApi create(AccountInput input) throws RestApiException
RestApiException
Accounts.SuggestAccountsRequest suggestAccounts() throws RestApiException
Example code: suggestAccounts().withQuery("Reviewer").withLimit(5).get()
RestApiException
Accounts.SuggestAccountsRequest suggestAccounts(String query) throws RestApiException
Shortcut API for suggestAccounts().withQuery(String)
.
RestApiException
suggestAccounts()
Accounts.QueryRequest query() throws RestApiException
Example code: query().withQuery("name:John email:example.com").withLimit(5).get()
RestApiException
Accounts.QueryRequest query(String query) throws RestApiException
Shortcut API for query().withQuery(String)
.
RestApiException
query()