ecxod/youtube

Langweilige Library des Ecxod Projekts

Maintainers

Details

github.com/ecxod/youtube

Source

Issues

Installs: 2

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/ecxod/youtube

1.0.2 2025-11-01 23:36 UTC

This package is auto-updated.

Last update: 2025-11-01 23:46:44 UTC


README

Explanation of the workflow

  1. Channel request – Retrieves statistics, the channel’s creation date, and the ID of the “uploads” playlist that contains every video the channel has posted.
  2. Playlist pagination – The uploads playlist is read in pages of up to 50 items (the API limit). Each video’s ID, title, and publish date are stored.
  3. Batch statistics – Video view counts are fetched in batches of 50 IDs (the maximum allowed per videos.list call) and merged back into the upload array.

The returned array looks like:

[
    'subscribers'  => 123456,
    'creationDate' => '2007-04-23T07:00:00Z',
    'totalViews'   => 987654321,
    'totalUploads' => 342,
    'uploads' => [
        [
            'videoId'     => 'a1b2c3d4e5',
            'title'       => 'First video',
            'publishedAt' => '2007-05-01T12:34:56Z',
            'viewCount'   => 12345,
        ],
        // …more videos
    ],
];