PHP 클래스 chobie\Jira\Api

파일 보기 프로젝트 열기: chobie/jira-api-restclient 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$authentication chobie\Jira\Api\Authentication\AuthenticationInterface Authentication.
$client chobie\Jira\Api\Client\ClientInterface Client.
$endpoint string Endpoint URL.
$fields array | null Client-side cache of fields. List of fields when loaded, null when nothing is fetched yet.
$options integer Options.
$priorities array | null Client-side cache of priorities. List of priorities when loaded, null when nothing is fetched yet.
$resolutions array | null Client-side cache of resolutions. List of resolutions when loaded, null when nothing is fetched yet.
$statuses array | null Client-side cache of statuses. List of statuses when loaded, null when nothing is fetched yet.

공개 메소드들

메소드 설명
__construct ( string $endpoint, chobie\Jira\Api\Authentication\AuthenticationInterface $authentication, chobie\Jira\Api\Client\ClientInterface $client = null ) Create a JIRA API client.
addComment ( string $issue_key, array | string $params ) : Result | false Add a comment to a ticket.
api ( string $method = self::REQUEST_GET, string $url, array | string $data = [], boolean $return_as_array = false, boolean $is_file = false, boolean $debug = false ) : array | Result | false Send request to specified host.
closeIssue ( string $issue_key ) : Result | array Closes issue.
createAttachment ( string $issue_key, string $filename, string $name = null ) : Result | false Create attachment.
createIssue ( string $project_key, string $summary, string $issue_type, array $options = [] ) : Result | false Creates an issue.
createRemotelink ( string $issue_key, array $object = [], string $relationship = null, string $global_id = null, array $application = null ) : array | false Creates a remote link.
createVersion ( string $project_key, string $version, array $options = [] ) : Result | false Creates new version.
downloadAttachment ( string $url ) : array | string Downloads attachment.
editIssue ( string $issue_key, array $params ) : Result | false Edits the issue.
findVersionByName ( string $project_key, string $name ) : array | null Helper method to find a specific version based on the name of the version.
getAttachment ( string $attachment_id ) : array | false Gets attachment.
getAttachmentsMetaInformation ( ) : array Gets attachments meta information.
getCreateMeta ( array $project_ids = null, array $project_keys = null, array $issue_type_ids = null, array $issue_type_names = null, array $expand = null ) : array | false Returns the meta data for creating issues.
getEndpoint ( ) : string Get Endpoint URL.
getFields ( ) : array Get fields definitions.
getIssue ( string $issue_key, string $expand = '' ) : Result | false Get specified issue.
getIssueTypes ( ) : IssueType[] Get available issue types.
getPriorities ( ) : array Get available priorities.
getProject ( string $project_key ) : array | false Returns one project.
getProjectComponents ( string $project_key ) : array Returns project components.
getProjectIssueTypes ( string $project_key ) : array Get all issue types with valid status values for a project.
getProjects ( ) : Result | false Returns all projects.
getResolutions ( ) : array Returns a list of all resolutions.
getRoleDetails ( string $project_key, string $role_id ) : array | false Returns role details.
getRoles ( string $project_key ) : array | false Returns all roles of a project.
getStatuses ( ) : array Get available statuses.
getTransitions ( string $issue_key, array $params ) : Result | false Get available transitions for a ticket.
getVersions ( string $project_key ) : array | false Get versions of a project.
getWorklogs ( string $issue_key, array $params ) : Result | false Get all worklogs for an issue.
releaseVersion ( integer $version_id, string | null $release_date = null, array $params = [] ) : false Shorthand to mark a version as Released.
search ( string $jql, integer $start_at, integer $max_results = 20, string $fields = '*navigable' ) : Result | false Query issues.
setEndpoint ( string $url ) : void Set Endpoint URL.
setOptions ( integer $options ) : void Sets options.
setWatchers ( string $issue_key, array $watchers ) : Result | false Set issue watchers.
transition ( string $issue_key, array $params ) : Result | false Transition a ticket.
updateVersion ( integer $version_id, array $params = [] ) : false Updates version.

보호된 메소드들

메소드 설명
automapFields ( array $issue ) : array Automaps issue fields.
clearLocalCaches ( ) : void Helper method to clear the local caches. Is called when switching endpoints

메소드 상세

__construct() 공개 메소드

Create a JIRA API client.
public __construct ( string $endpoint, chobie\Jira\Api\Authentication\AuthenticationInterface $authentication, chobie\Jira\Api\Client\ClientInterface $client = null )
$endpoint string Endpoint URL.
$authentication chobie\Jira\Api\Authentication\AuthenticationInterface Authentication.
$client chobie\Jira\Api\Client\ClientInterface Client.

addComment() 공개 메소드

Add a comment to a ticket.
public addComment ( string $issue_key, array | string $params ) : Result | false
$issue_key string Issue key should be "YOURPROJ-221".
$params array | string Params.
리턴 chobie\Jira\Api\Result | false

api() 공개 메소드

Send request to specified host.
public api ( string $method = self::REQUEST_GET, string $url, array | string $data = [], boolean $return_as_array = false, boolean $is_file = false, boolean $debug = false ) : array | Result | false
$method string Request method.
$url string URL.
$data array | string Data.
$return_as_array boolean Return results as associative array.
$is_file boolean Is file-related request.
$debug boolean Debug this request.
리턴 array | chobie\Jira\Api\Result | false

automapFields() 보호된 메소드

Automaps issue fields.
protected automapFields ( array $issue ) : array
$issue array Issue.
리턴 array

clearLocalCaches() 보호된 메소드

Helper method to clear the local caches. Is called when switching endpoints
protected clearLocalCaches ( ) : void
리턴 void

closeIssue() 공개 메소드

Closes issue.
public closeIssue ( string $issue_key ) : Result | array
$issue_key string Issue key.
리턴 chobie\Jira\Api\Result | array

createAttachment() 공개 메소드

Create attachment.
public createAttachment ( string $issue_key, string $filename, string $name = null ) : Result | false
$issue_key string Issue key.
$filename string Filename.
$name string Name.
리턴 chobie\Jira\Api\Result | false

createIssue() 공개 메소드

Creates an issue.
public createIssue ( string $project_key, string $summary, string $issue_type, array $options = [] ) : Result | false
$project_key string Project key.
$summary string Summary.
$issue_type string Issue type.
$options array Options.
리턴 chobie\Jira\Api\Result | false

createVersion() 공개 메소드

Creates new version.
public createVersion ( string $project_key, string $version, array $options = [] ) : Result | false
$project_key string Project key.
$version string Version.
$options array Options.
리턴 chobie\Jira\Api\Result | false

downloadAttachment() 공개 메소드

Downloads attachment.
public downloadAttachment ( string $url ) : array | string
$url string URL.
리턴 array | string

editIssue() 공개 메소드

Edits the issue.
public editIssue ( string $issue_key, array $params ) : Result | false
$issue_key string Issue key.
$params array Params.
리턴 chobie\Jira\Api\Result | false

findVersionByName() 공개 메소드

Helper method to find a specific version based on the name of the version.
부터: 2.0.0
public findVersionByName ( string $project_key, string $name ) : array | null
$project_key string Project Key.
$name string The version name to match on.
리턴 array | null Version data on match or null when there is no match.

getAttachment() 공개 메소드

Gets attachment.
public getAttachment ( string $attachment_id ) : array | false
$attachment_id string Attachment ID.
리턴 array | false

getAttachmentsMetaInformation() 공개 메소드

Gets attachments meta information.
부터: 2.0.0

getCreateMeta() 공개 메소드

This includes the available projects, issue types and fields, including field types and whether or not those fields are required. Projects will not be returned if the user does not have permission to create issues in that project. Fields will only be returned if "projects.issuetypes.fields" is added as expand parameter.
public getCreateMeta ( array $project_ids = null, array $project_keys = null, array $issue_type_ids = null, array $issue_type_names = null, array $expand = null ) : array | false
$project_ids array Combined with the projectKeys param, lists the projects with which to filter the results. If absent, all projects are returned. Specifying a project that does not exist (or that you cannot create issues in) is not an error, but it will not be in the results.
$project_keys array Combined with the projectIds param, lists the projects with which to filter the results. If null, all projects are returned. Specifying a project that does not exist (or that you cannot create issues in) is not an error, but it will not be in the results.
$issue_type_ids array Combined with issuetypeNames, lists the issue types with which to filter the results. If null, all issue types are returned. Specifying an issue type that does not exist is not an error.
$issue_type_names array Combined with issuetypeIds, lists the issue types with which to filter the results. If null, all issue types are returned. This parameter can be specified multiple times, but is NOT interpreted as a comma-separated list. Specifying an issue type that does not exist is not an error.
$expand array Optional list of entities to expand in the response.
리턴 array | false

getEndpoint() 공개 메소드

Get Endpoint URL.
public getEndpoint ( ) : string
리턴 string

getFields() 공개 메소드

Get fields definitions.
public getFields ( ) : array
리턴 array

getIssue() 공개 메소드

Get specified issue.
public getIssue ( string $issue_key, string $expand = '' ) : Result | false
$issue_key string Issue key should be "YOURPROJ-221".
$expand string Expand.
리턴 chobie\Jira\Api\Result | false

getIssueTypes() 공개 메소드

Get available issue types.
public getIssueTypes ( ) : IssueType[]
리턴 IssueType[]

getPriorities() 공개 메소드

Get available priorities.
부터: 2.0.0
public getPriorities ( ) : array
리턴 array

getProject() 공개 메소드

Returns one project.
public getProject ( string $project_key ) : array | false
$project_key string Project key.
리턴 array | false

getProjectComponents() 공개 메소드

Returns project components.
부터: 2.0.0
public getProjectComponents ( string $project_key ) : array
$project_key string Project key.
리턴 array

getProjectIssueTypes() 공개 메소드

Get all issue types with valid status values for a project.
부터: 2.0.0
public getProjectIssueTypes ( string $project_key ) : array
$project_key string Project key.
리턴 array

getProjects() 공개 메소드

Returns all projects.
public getProjects ( ) : Result | false
리턴 chobie\Jira\Api\Result | false

getResolutions() 공개 메소드

Returns a list of all resolutions.
부터: 2.0.0
public getResolutions ( ) : array
리턴 array

getRoleDetails() 공개 메소드

Returns role details.
public getRoleDetails ( string $project_key, string $role_id ) : array | false
$project_key string Project key.
$role_id string Role ID.
리턴 array | false

getRoles() 공개 메소드

Returns all roles of a project.
public getRoles ( string $project_key ) : array | false
$project_key string Project key.
리턴 array | false

getStatuses() 공개 메소드

Get available statuses.
public getStatuses ( ) : array
리턴 array

getTransitions() 공개 메소드

Get available transitions for a ticket.
public getTransitions ( string $issue_key, array $params ) : Result | false
$issue_key string Issue key should be "YOURPROJ-22".
$params array Params.
리턴 chobie\Jira\Api\Result | false

getVersions() 공개 메소드

Get versions of a project.
public getVersions ( string $project_key ) : array | false
$project_key string Project key.
리턴 array | false

getWorklogs() 공개 메소드

Get all worklogs for an issue.
부터: 2.0.0
public getWorklogs ( string $issue_key, array $params ) : Result | false
$issue_key string Issue key should be "YOURPROJ-22".
$params array Params.
리턴 chobie\Jira\Api\Result | false

releaseVersion() 공개 메소드

Shorthand to mark a version as Released.
부터: 2.0.0
public releaseVersion ( integer $version_id, string | null $release_date = null, array $params = [] ) : false
$version_id integer Version ID.
$release_date string | null Date in Y-m-d format (defaults to today).
$params array Optionally extra parameters.
리턴 false

setEndpoint() 공개 메소드

Set Endpoint URL.
public setEndpoint ( string $url ) : void
$url string Endpoint URL.
리턴 void

setOptions() 공개 메소드

Sets options.
public setOptions ( integer $options ) : void
$options integer Options.
리턴 void

setWatchers() 공개 메소드

Set issue watchers.
public setWatchers ( string $issue_key, array $watchers ) : Result | false
$issue_key string Issue key.
$watchers array Watchers.
리턴 chobie\Jira\Api\Result | false

transition() 공개 메소드

Transition a ticket.
public transition ( string $issue_key, array $params ) : Result | false
$issue_key string Issue key should be "YOURPROJ-22".
$params array Params.
리턴 chobie\Jira\Api\Result | false

updateVersion() 공개 메소드

Updates version.
public updateVersion ( integer $version_id, array $params = [] ) : false
$version_id integer Version ID.
$params array Key->Value list to update the version with.
리턴 false

프로퍼티 상세

$authentication 보호되어 있는 프로퍼티

Authentication.
protected AuthenticationInterface,chobie\Jira\Api\Authentication $authentication
리턴 chobie\Jira\Api\Authentication\AuthenticationInterface

$client 보호되어 있는 프로퍼티

Client.
protected ClientInterface,chobie\Jira\Api\Client $client
리턴 chobie\Jira\Api\Client\ClientInterface

$endpoint 보호되어 있는 프로퍼티

Endpoint URL.
protected string $endpoint
리턴 string

$fields 보호되어 있는 프로퍼티

Client-side cache of fields. List of fields when loaded, null when nothing is fetched yet.
protected array|null $fields
리턴 array | null

$options 보호되어 있는 프로퍼티

Options.
protected int $options
리턴 integer

$priorities 보호되어 있는 프로퍼티

Client-side cache of priorities. List of priorities when loaded, null when nothing is fetched yet.
protected array|null $priorities
리턴 array | null

$resolutions 보호되어 있는 프로퍼티

Client-side cache of resolutions. List of resolutions when loaded, null when nothing is fetched yet.
protected array|null $resolutions
리턴 array | null

$statuses 보호되어 있는 프로퍼티

Client-side cache of statuses. List of statuses when loaded, null when nothing is fetched yet.
protected array|null $statuses
리턴 array | null