src/Message.php
public function getByProjectAndCategory($project_id, $category_id, $archive = false)
    {
        $project_id  = (int) $project_id;
        if ($project_id <= 0) {
            throw new \TeamWorkPm\Exception('Invalid param project_id');
        }
        $category_id  = (int) $category_id;
        if ($category_id <= 0) {
            throw new \TeamWorkPm\Exception('Invalid param category_id');
        }
        $action = "projects/$project_id/cat/$category_id/$this->action";
        if ($archive) {
            $action .= '/archive';
        }
        return $this->rest->get($action);
    }
public function getByProjectAndCategory($project_id, $category_id, $archive = false)
    {
        $project_id  = (int) $project_id;
        if ($project_id <= 0) {
            throw new \TeamWorkPm\Exception('Invalid param project_id');
        }
        $category_id  = (int) $category_id;
        if ($category_id <= 0) {
            throw new \TeamWorkPm\Exception('Invalid param category_id');
        }
        $action = "projects/$project_id/cat/$category_id/$this->action";
        if ($archive) {
            $action .= '/archive';
        }
        return $this->rest->get($action);
    }
public function getByProjectAndCategory ( $ project_id , $ category_id , $ archive = false ) { $ project_id = ( int ) $ project_id ; if ( $ project_id <= 0 ) { throw new \ TeamWorkPm \ Exception ( 'Invalid param project_id' ) ; } $ category_id = ( int ) $ category_id ; if ( $ category_id <= 0 ) { throw new \ TeamWorkPm \ Exception ( 'Invalid param category_id' ) ; } $ action = "projects/$project_id/cat/$category_id/$this->action" ; if ( $ archive ) { $ action .= '/archive' ; } return $ this -> rest -> get ( $ action ) ; }
Retrieve Messages by Category

GET /projects/#{project_id}/cat/#{category_id}/posts.xml

As before, will return you the most recent 25 messages, this time limited by project and category.

Get archived messages by category

GET /projects/#{project_id}/cat/#{category_id}/posts/archive.xml

As above, but returns only the posts in the given category

@param int $project_id
@param int $category_id
@param bool $archive

@return \TeamWorkPm\Response\Model
@throws \TeamWorkPm\Exception
Retrieve Messages by Category