Skip to content

Commit

Permalink
Add projects/:projectIdOrKey/statuses
Browse files Browse the repository at this point in the history
  • Loading branch information
itigoppo committed Oct 18, 2019
1 parent e6f1a47 commit ae0023a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ $backlog->projects->load([array $query_params = []]);
クエリパラメータは以下参照
https://developer.nulab-inc.com/ja/docs/backlog/api/2/get-project-list/

### プロジェクトの状態一覧の取得

```php
$backlog->projects->statuses(string $project_id_or_key);
```

### プロジェクト情報の取得

```php
Expand Down
3 changes: 2 additions & 1 deletion src/Backlog/Backlog.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ public function __construct($connector)
/**
* 状態一覧の取得
*
* @return mixed|string
* @return array
* @deprecated プロジェクトごとになりました('19/10/18) @link $backlog->projects->statuses($project_id_or_key)
*/
public function statuses()
{
Expand Down
11 changes: 11 additions & 0 deletions src/Backlog/Projects.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ public function __construct(Connector $connector)
$this->connector = $connector;
}

/**
* プロジェクト情報の取得
*
* @param string $project_id_or_key
* @return array
*/
public function statuses($project_id_or_key)
{
return $this->connector->get(sprintf('projects/%s/statuses', $project_id_or_key));
}

/**
* プロジェクト一覧の取得
*
Expand Down

0 comments on commit ae0023a

Please sign in to comment.