src/Model/Project.php
public function getActivities($limit = 0, $type = null, $startsAt = null)
    {
        $options = [];
        if ($type !== null) {
            $options['query']['type'] = $type;
        }
        if ($startsAt !== null) {
            $options['query']['starts_at'] = Activity::formatStartsAt($startsAt);
        }

        $activities = Activity::getCollection($this->getUri() . '/activities', $limit, $options, $this->client);

        // Guarantee the type filter (works around a temporary bug).
        if ($type !== null) {
            $activities = array_filter($activities, function (Activity $activity) use ($type) {
                return $activity->type === $type;
            });
        }

        return $activities;
    }
public function getActivities($limit = 0, $type = null, $startsAt = null)
    {
        $options = [];
        if ($type !== null) {
            $options['query']['type'] = $type;
        }
        if ($startsAt !== null) {
            $options['query']['starts_at'] = Activity::formatStartsAt($startsAt);
        }

        $activities = Activity::getCollection($this->getUri() . '/activities', $limit, $options, $this->client);

        // Guarantee the type filter (works around a temporary bug).
        if ($type !== null) {
            $activities = array_filter($activities, function (Activity $activity) use ($type) {
                return $activity->type === $type;
            });
        }

        return $activities;
    }
public function getActivities ( $ limit = 0 , $ type = null , $ startsAt = null ) { $ options = [ ] ; if ( $ type !== null ) { $ options [ 'query' ] [ 'type' ] = $ type ; } if ( $ startsAt !== null ) { $ options [ 'query' ] [ 'starts_at' ] = Activity :: formatStartsAt ( $ startsAt ) ; } $ activities = Activity :: getCollection ( $ this -> getUri ( ) . '/activities' , $ limit , $ options , $ this -> client ) ; // Guarantee the type filter (works around a temporary bug). if ( $ type !== null ) { $ activities = array_filter ( $ activities , function ( Activity $ activity ) use ( $ type ) { return $ activity -> type === $ type ; } ) ; } return $ activities ; }
Get a list of project activities.

@param int $limit
Limit the number of activities to return.
@param string $type
Filter activities by type.
@param int $startsAt
A UNIX timestamp for the maximum created date of activities to return.

@return Activity[]
Get a list of project activities .