MCPcopy Index your code
hub / github.com/simstudioai/sim / getVideoId

Function getVideoId

apps/sim/connectors/youtube/youtube.ts:174–176  ·  view source on GitHub ↗

* Extracts the video ID from a playlist item, preferring the stable * `contentDetails.videoId` over the legacy `snippet.resourceId.videoId`.

(item: PlaylistItem)

Source from the content-addressed store, hash-verified

172 * `contentDetails.videoId` over the legacy `snippet.resourceId.videoId`.
173 */
174function getVideoId(item: PlaylistItem): string {
175 return item.contentDetails?.videoId ?? item.snippet?.resourceId?.videoId ?? ''
176}
177
178/**
179 * Reads the optional `publishedAfter` cutoff from sourceConfig as a timestamp (ms),

Callers 2

itemToStubFunction · 0.85
youtube.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected