Skip to content

Commit 08e1f4a

Browse files
committed
update project type.
1 parent 1cae9fd commit 08e1f4a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ $iss = new IssueService(new ArrayConfiguration(
9191
### Project
9292
- [Get Project Info](#get-project-info)
9393
- [Get All Project list](#get-all-project-list)
94+
- [Get Project Type](#get-project-type)
9495

9596
### Custom Field
9697
- [Get All Field list](#get-all-field-list)
@@ -160,6 +161,36 @@ try {
160161

161162
```
162163

164+
#### Get Project type
165+
166+
```php
167+
<?php
168+
require 'vendor/autoload.php';
169+
170+
use JiraRestApi\Project\ProjectService;
171+
use JiraRestApi\Project\ProjectType;
172+
use JiraRestApi\JiraException;
173+
174+
try {
175+
$proj = new ProjectService();
176+
177+
// get all project type
178+
$prjtyps = $proj->getProjectTypes();
179+
180+
foreach ($prjtyps as $pt) {
181+
var_dump($pt);
182+
}
183+
184+
// get specific project type.
185+
$pt = $proj->getProjectType('software');
186+
var_dump($pt);
187+
188+
} catch (JiraException $e) {
189+
print("Error Occured! " . $e->getMessage());
190+
}
191+
192+
```
193+
163194
#### Get All Field List
164195

165196
```php

0 commit comments

Comments
 (0)