ProjectsResource
Lists projects and manages the current project's members, features and settings.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.24+fa54770
public final class ProjectsResourceLists projects and manages the current project's members, features and settings. Get it from Ovok.projects().
Methods
members
public ProjectsResource.Members members()Returns the current project's member routes.
Returns: the members resource
features
public ProjectsResource.Features features()Returns the current project's feature routes.
Returns: the features resource
settings
public ProjectsResource.Settings settings()Returns the current project's settings routes.
Returns: the settings resource
list
public Page<JsonNode> list(
Map<String, ?> query,
RequestOptions options) throws IOException, InterruptedExceptionLists the projects the caller can see (GET /v1/projects).
Parameters:
query: query parameters, such as the page numberoptions: per-request options, such as the timeout
Returns: the first page of projects; iterating it loads the next pages
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
ProjectsResource.Members
public static final class MembersManages the current project's members (/v1/projects/me/members).
Members.list
public Page<JsonNode> list(
Map<String, ?> query,
RequestOptions options) throws IOException, InterruptedExceptionLists the current project's members (GET /v1/projects/me/members).
Parameters:
query: query parameters, such as the page numberoptions: per-request options, such as the timeout
Returns: the first page of members; iterating it loads the next pages
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Members.invite
public JsonNode invite(Object body, RequestOptions options) throws IOException, InterruptedExceptionInvites a member to the current project (POST /v1/projects/me/members).
Parameters:
body: the invitation, serialized as JSONoptions: per-request options, such as the timeout
Returns: the response body
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Members.update
public JsonNode update(
String membershipId,
Object body,
RequestOptions options) throws IOException, InterruptedExceptionUpdates a membership (PATCH /v1/projects/me/members/{membershipId}).
Parameters:
membershipId: the membership idbody: the fields to change, serialized as JSONoptions: per-request options, such as the timeout
Returns: the updated membership
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Members.remove
public JsonNode remove(
String membershipId,
RequestOptions options) throws IOException, InterruptedExceptionRemoves a member from the current project (DELETE /v1/projects/me/members/{membershipId}).
Parameters:
membershipId: the membership idoptions: per-request options, such as the timeout
Returns: the response body, or null when it is empty
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
ProjectsResource.Features
public static final class FeaturesReads and changes the current project's features (/v1/projects/me/features).
Features.retrieve
public JsonNode retrieve(RequestOptions options) throws IOException, InterruptedExceptionReads the current project's features (GET /v1/projects/me/features).
Parameters:
options: per-request options, such as the timeout
Returns: the features
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Features.update
public JsonNode update(
Object features,
RequestOptions options) throws IOException, InterruptedExceptionReplaces the current project's features (PATCH /v1/projects/me/features).
Parameters:
features: the features, sent as thefeaturesfieldoptions: per-request options, such as the timeout
Returns: the updated features
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
ProjectsResource.Settings
public static final class SettingsReads and changes the current project's settings (/v1/project/settings).
Settings.retrieve
public JsonNode retrieve(RequestOptions options) throws IOException, InterruptedExceptionReads the current project's settings (GET /v1/project/settings).
Parameters:
options: per-request options, such as the timeout
Returns: the settings
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Settings.update
public JsonNode update(
String key,
boolean enabled,
RequestOptions options) throws IOException, InterruptedExceptionTurns a boolean setting on or off (PUT /v1/project/settings/{key}).
Parameters:
key: the setting keyenabled: whether the setting is onoptions: per-request options, such as the timeout
Returns: the response body, or null when it is empty
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Settings.updateText
public JsonNode updateText(
String key,
String value,
RequestOptions options) throws IOException, InterruptedExceptionSets a text setting's value (PUT /v1/project/settings/values/{key}).
Parameters:
key: the setting keyvalue: the new value, ornullto clear itoptions: per-request options, such as the timeout
Returns: the response body, or null when it is empty
Throws:
IOException: if the request cannot be sent or the response cannot be readInterruptedException: if the thread is interrupted while waiting for the response
Last updated on