diff --git a/src/Jira/Api.php b/src/Jira/Api.php index cc7dd40..92d8804 100644 --- a/src/Jira/Api.php +++ b/src/Jira/Api.php @@ -197,6 +197,17 @@ public function editIssue($issue_key, array $params) return $this->api(self::REQUEST_PUT, sprintf('/rest/api/2/issue/%s', $issue_key), $params); } + /** + * Gets attachments meta information. + * + * @return array + * @since 2.0.0 + */ + public function getAttachmentsMetaInformation() + { + return $this->api(self::REQUEST_GET, '/rest/api/2/attachment/meta'); + } + /** * Gets attachment. * @@ -835,4 +846,42 @@ public function closeIssue($issue_key) return $result; } + /** + * Returns project components. + * + * @param string $project_key Project key. + * + * @return array|false + * @since 2.0.0 + */ + public function getProjectComponents($project_key) + { + return $this->api(self::REQUEST_GET, sprintf('/rest/api/2/project/%s/components', $project_key), array(), true); + } + + /** + * Get all issue types with valid status values for a project. + * + * @param string $project_key Project key. + * + * @return array + * @since 2.0.0 + */ + public function getAllIssueTypes($project_key) + { + return $this->api(self::REQUEST_GET, "/rest/api/2/project/{$project_key}/statuses", array(), true); + } + + /** + * Returns a list of all resolutions. + * + * @param string $project_key Project key. + * + * @return array|false + * @since 2.0.0 + */ + public function getResolutions() + { + return $this->api(self::REQUEST_GET, "/rest/api/2/resolution", array(), true); + } }