-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
352 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Fields | ||
The YouTrack API returns only the fields `id` and `$type` if no other fields are specified. In order to retrieve other fields already in the standard, which are often needed, this library adds standard fields for each endpoint. | ||
|
||
## Define return fields | ||
Before each query, the fields to be retrieved can be defined. | ||
|
||
```php | ||
$youtrack->issues() | ||
->fields(['idReadable', 'summary', 'description']) | ||
->all(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Filter & Pagination | ||
Manipulators such as filters or pagination methods, must always be between the endpoint and the query: | ||
```php | ||
$youtrack->issues() // Endpoint | ||
... // Filters or Pagination | ||
->all(); // Query | ||
``` | ||
|
||
## Filter | ||
In YouTrack, these filters are called `queries`. Since we can also manipulate the URL query, we use the wording `filter` here. | ||
|
||
```php | ||
$youtrack->issues() | ||
->filter('state:resolved') | ||
->all(); | ||
|
||
// Multiple filters can also be applied | ||
$youtrack->issues() | ||
->filter('state:resolved') | ||
->filter('for:me') | ||
->all(); | ||
|
||
// Or separated with a space | ||
$youtrack->issues() | ||
->filter('state:resolved for:me') | ||
->all(); | ||
``` | ||
|
||
## Pagination | ||
The first parameter specifies the `offset`, the second the `limit`. | ||
```php | ||
$youtrack->issues() | ||
->paginate(0, 10) | ||
->all(); | ||
|
||
// In combination with filters | ||
$youtrack->issues() | ||
->filter('state:resolved') | ||
->paginate(0, 10) | ||
->all(); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Issue Comments | ||
```php | ||
$youtrack->issues() | ||
->comments() | ||
``` | ||
|
||
##### `all()` | ||
Returns all issue comments. | ||
|
||
##### `one($issueId, $commentId)` | ||
Returns a specific issue based on the issue and comment ID. | ||
|
||
## Default return fields | ||
```php | ||
[ | ||
'id', | ||
'text', | ||
'textPreview', | ||
'created', | ||
'updated', | ||
'author', | ||
'issue', | ||
'attachments', | ||
'visibility', | ||
'deleted' | ||
] | ||
``` | ||
!> Go to [Fields](fields.md) to learn more about default return fields. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Issues | ||
```php | ||
// Endpoint | ||
$youtrack->issues() | ||
``` | ||
|
||
##### `all()` | ||
Returns all issues. | ||
|
||
##### `one($issueId)` | ||
Returns a specific issue based on the issue ID. | ||
|
||
##### `project($projectId)` | ||
Returns all issues based on the project ID. | ||
|
||
##### `customFields($issueId)` | ||
Returns all custom fields based on the issue ID. | ||
|
||
##### `attachments($issueId)` | ||
Returns all attachments based on the issue ID. | ||
|
||
## Sub-Endpoints | ||
|
||
##### `comments()` | ||
Returns the sub-endpoint for Comments. | ||
|
||
##### `tags()` | ||
Returns the sub-endpoint for Tags. | ||
|
||
##### `timeTracking()` | ||
Returns the sub-endpoint for Time Tracking. | ||
|
||
## Default return fields | ||
```php | ||
[ | ||
'id', | ||
'idReadable', | ||
'summary', | ||
'description', | ||
'state', | ||
'customFields' => [ | ||
'name', | ||
'$type', | ||
'value' => [ | ||
'name' | ||
], | ||
], | ||
'project' => [ | ||
'name' | ||
] | ||
] | ||
``` | ||
!> Go to [Fields](fields.md) to learn more about default return fields. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Issue Tags | ||
```php | ||
$youtrack->issues() | ||
->tags() | ||
``` | ||
|
||
##### `all($issueId)` | ||
Returns all issue tags based on the issue ID. | ||
|
||
## Default return fields | ||
```php | ||
[ | ||
'id', | ||
'issues', | ||
'color', | ||
'untagOnResolve', | ||
'visibleFor', | ||
'updateableBy', | ||
'readSharingSettings', | ||
'tagSharingSettings', | ||
'updateSharingSettings', | ||
'owner', | ||
'name' | ||
] | ||
``` | ||
!> Go to [Fields](fields.md) to learn more about default return fields. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Issue Time Tracking | ||
```php | ||
$youtrack->issues() | ||
->timeTracking() | ||
``` | ||
|
||
##### `all($issueId)` | ||
Returns all issue time tracking items based on the issue ID. | ||
|
||
##### `workItems($issueId)` | ||
Returns a specific issue based on the issue ID. | ||
|
||
## Default return fields | ||
```php | ||
[ | ||
'id', | ||
'author' => [ | ||
'id' | ||
], | ||
'creator' => [ | ||
'id' | ||
], | ||
'text', | ||
'textPreview', | ||
'type', | ||
'created', | ||
'updated', | ||
'duration' => [ | ||
'id', | ||
'minutes', | ||
'presentation' | ||
], | ||
'date', | ||
'issue', | ||
'attributes' | ||
] | ||
``` | ||
!> Go to [Fields](fields.md) to learn more about default return fields. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.