src/Api/Story.php
public function comments(int $start = 0, int $count = 10, string $sort = 'ASC') : array
    {
        $returnComments = [];

        if ($this->commentCount() === 0) return $returnComments;

        $comments = $this->get(sprintf(self::ACTIVITY_ENDPOINT . 'v1/users/%s/stories/%s/comments', $this->user()->onlineIdParameter(), $this->storyId()), [
            'start' => $start,
            'count' => $count,
            'sort' => $sort
        ]);

        foreach ($comments->userComments as $comment) {
            $returnComments[] = new Comment($this->client, $comment, $this);
        }
        
        return $returnComments;
    }
public function comments(int $start = 0, int $count = 10, string $sort = 'ASC') : array
    {
        $returnComments = [];

        if ($this->commentCount() === 0) return $returnComments;

        $comments = $this->get(sprintf(self::ACTIVITY_ENDPOINT . 'v1/users/%s/stories/%s/comments', $this->user()->onlineIdParameter(), $this->storyId()), [
            'start' => $start,
            'count' => $count,
            'sort' => $sort
        ]);

        foreach ($comments->userComments as $comment) {
            $returnComments[] = new Comment($this->client, $comment, $this);
        }
        
        return $returnComments;
    }
public function comments ( int $ start = 0 , int $ count = 10 , string $ sort = 'ASC' ) : array { $ returnComments = [ ] ; if ( $ this -> commentCount ( ) === 0 ) return $ returnComments ; $ comments = $ this -> get ( sprintf ( self :: ACTIVITY_ENDPOINT . 'v1/users/%s/stories/%s/comments' , $ this -> user ( ) -> onlineIdParameter ( ) , $ this -> storyId ( ) ) , [ 'start' => $ start , 'count' => $ count , 'sort' => $ sort ] ) ; foreach ( $ comments -> userComments as $ comment ) { $ returnComments [ ] = new Comment ( $ this -> client , $ comment , $ this ) ; } return $ returnComments ; }
Gets all the Comments for the Story.

@param integer $start Which comments to start from.
@param integer $count How many comments to get.
@param string $sort How comments are sorted (ASC/DESC).
@return array Array of API\Comment.
Gets all the Comments for the Story .