| Interface | Description |
|---|---|
| AssignedField | |
| Comment |
A comment created on a YouTrack
Issue. |
| Comments | |
| Field |
A property of
issues. |
| Fields | |
| FieldValue |
A value for some
Field. |
| Issue |
A
YouTrack issue. |
| Issues |
Issues API.
|
| IssueTimeTracking |
API for
Issue timetracking. |
| Project |
A YouTrack project.
|
| ProjectField | |
| Projects |
Fetches
projects from the YouTrack server. |
| ProjectTimeTracking |
Access to a
project's timetracking settings. |
| TimeTrackEntry |
An entry in an
issue's timetracking. |
| TimeTrackEntryType |
The
TimeTrackEntry's type. |
| UpdateIssue |
API to update an
Issue. |
| User |
A registered user in YouTrack.
|
| UsersOfIssue | |
| UsersOfProject | |
| Xml |
Encapsulation of the XML messages sent to/received from YouTrack.
|
| YouTrack |
Entry point for the YouTrack API.
|
| Class | Description |
|---|---|
| DefaultYouTrack |
Default implementation of
YouTrack. |
| Issues.IssueSpec |
Specifications for building an
Issue. |
| IssueTimeTracking.EntrySpec |
Specifications for creating a
TimeTrackEntry on an Issue. |
youtrack-api implements:
Example:
final Session session = new PermanentTokenLogin(youtrackUrl, myToken).login();
See the org.llorllale.youtrack.api.session package for more info.
YouTrack interface.
Obtain an instance of the default implementation like this:final YouTrack yt = new DefaultYouTrack(session);.
Projects interface is used to find
projects. final Optional<Project> project = new DefaultYoutrack(session)
.projects() //returns the Projects interface
.get("projectId"); //returns an Optional<Project>
See interfaces Projects and
Project.
issue like this: final Optional<Issue> issue = project.issues().get("issueId");
To create an issue, use
Issues.create(org.llorllale.youtrack.api.Issues.IssueSpec):
final Issue is = project.issues().create(new IssueSpec("summary", "description"));
See Issues and
Issues.IssueSpec for more info.
creationDate,
summary, and description (although optional). Behind the scenes, YouTrack
supports fields like State and Priority through the use of
custom fields that are configured (sometimes preconfigured) through a project's
settings.fields:
final Stream<ProjectField> fields = project.fields().stream();
To access all possible values for a field:
final Stream<FieldValue> values = projectField.values();
Updating an issue's fields can be done in two ways:
org.llorllale.youtrack.api.SelectableFieldValue on one of the
issue's fieldsIssue.update() issue.fields().stream()
.filter(f -> "State".equals(f.name())
.findAny().get()
.change() //opens a stream of SelectableFieldValue
.filter(v -> "Done".equals(v.asString())
.findAny().get()
.apply();
Example of the latter:
final ProjectField state = project.fields().stream()
.filter(f -> "State".equals(f.name()))
.findAny().get();
final FieldValue done = state.values()
.filter(v -> "Done".equals(v.asString())
.findAny().get();
final Issue issueUpdated = issue.update().field(state, done);Copyright © 2017–2018 George Aristy. All rights reserved.