src/Api/User.php
public function story(int $page = 0, bool $includeComments = true, int $offset = 0, int $blockSize = 10) : array
    {
        $returnActivity = [];
        $activity = $this->get(sprintf(Story::ACTIVITY_ENDPOINT . 'v2/users/%s/feed/%d', $this->onlineIdParameter, $page), [
            'includeComments' => $includeComments,
            'offset' => $offset,
            'blockSize' => $blockSize
        ]);

        foreach ($activity->feed as $story) {
            // Some stories might just be a collection of similiar stories (like trophy unlocks)
            // These stories can't be interacted with like other stories, so we need to grab the condensed stories
            if (isset($story->condensedStories)) {
                foreach ($story->condensedStories as $condensed) {
                    $returnActivity[] = new Story($this->client, $condensed, $this);
                }
            } else {
                $returnActivity[] = new Story($this->client, $story, $this);
            }
        }

        return $returnActivity;
    }
public function story(int $page = 0, bool $includeComments = true, int $offset = 0, int $blockSize = 10) : array
    {
        $returnActivity = [];
        $activity = $this->get(sprintf(Story::ACTIVITY_ENDPOINT . 'v2/users/%s/feed/%d', $this->onlineIdParameter, $page), [
            'includeComments' => $includeComments,
            'offset' => $offset,
            'blockSize' => $blockSize
        ]);

        foreach ($activity->feed as $story) {
            // Some stories might just be a collection of similiar stories (like trophy unlocks)
            // These stories can't be interacted with like other stories, so we need to grab the condensed stories
            if (isset($story->condensedStories)) {
                foreach ($story->condensedStories as $condensed) {
                    $returnActivity[] = new Story($this->client, $condensed, $this);
                }
            } else {
                $returnActivity[] = new Story($this->client, $story, $this);
            }
        }

        return $returnActivity;
    }
public function story ( int $ page = 0 , bool $ includeComments = true , int $ offset = 0 , int $ blockSize = 10 ) : array { $ returnActivity = [ ] ; $ activity = $ this -> get ( sprintf ( Story :: ACTIVITY_ENDPOINT . 'v2/users/%s/feed/%d' , $ this -> onlineIdParameter , $ page ) , [ 'includeComments' => $ includeComments , 'offset' => $ offset , 'blockSize' => $ blockSize ] ) ; foreach ( $ activity -> feed as $ story ) { // Some stories might just be a collection of similiar stories (like trophy unlocks) // These stories can't be interacted with like other stories, so we need to grab the condensed stories if ( isset ( $ story -> condensedStories ) ) { foreach ( $ story -> condensedStories as $ condensed ) { $ returnActivity [ ] = new Story ( $ this -> client , $ condensed , $ this ) ; } } else { $ returnActivity [ ] = new Story ( $ this -> client , $ story , $ this ) ; } } return $ returnActivity ; }
Gets the User's Activity.

@return array Array of Api\Story
Gets the User s Activity .