← all adapters

youtube-style

simulates YouTube Data API v3

restadapter v0.1.014 routes

verification

SDKverified with google-api-go-client v0.293.0· surface 14 · not implemented 7 · differs 2

use it

# add to stunt.yaml
services:
  youtube:
    adapter: embedded:youtube-style

# then
$ stunt up

The embedded: source extracts this adapter from the binary — no git clone, fully offline.

how to mock the YouTube Data API locally

Install stunt, paste the service block above into stunt.yaml, run stunt up — then point your client at localhost instead of YouTube Data API. It works offline, keeps state across requests and restarts, and every response is synthetic: the route shapes, status codes, pagination, and webhook delivery follow the real YouTube Data API v3 surface — the data is fake, the behavior is real.

backing stores

tokensrefresh_tokenscodesvideosplaylistsplaylist_items

api surface (14)

generated from the adapter manifest — exactly what boots, nothing more · covers 10% of the real API's 83 routes (derived from sdk google-api-go-client @ v0.293.0)

14 routes
GET/o/oauth2/auth
POST/o/oauth2/token
POST/upload/youtube/v3/videos
PUT/upload/youtube/v3/videos/{upload_id}
DELETE/upload/youtube/v3/videos/{upload_id}
GET/youtube/v3/videos
POST/youtube/v3/videos
DELETE/youtube/v3/videos
GET/youtube/v3/channels
POST/youtube/v3/playlists
GET/youtube/v3/playlists
DELETE/youtube/v3/playlists
POST/youtube/v3/playlistItems
DELETE/youtube/v3/playlistItems

SDK-verified behaviors (8)

  • OAuth2 authorize + exchange mint the access token the SDK presents
  • Videos.Insert metadata-only + Videos.List id= round-trip with part projection
  • Videos.List without id lists every user video
  • Videos.List MaxResults + PageToken walk pages
  • Channels.List mine=true returns the authenticated user's channel
  • Playlists.Insert + Playlists.List mine=true round-trip
  • PlaylistItems.Insert adds the video, Delete removes it
  • Videos.Delete -> 204; re-delete surfaces a googleapi 404

Not implemented (7)

  • No search endpoint (/youtube/v3/search)
  • No comments or commentThreads endpoints
  • No video update (PUT), rate, or reportAbuse endpoints
  • Channels supports mine=true only; no list by id/forUsername or update
  • No playlist update or playlistItems list endpoints
  • No captions, thumbnails set, videoCategories, or i18n endpoints
  • No subscriptions, activities, or live streaming surfaces

Differs from the real API (2)

  • GET /youtube/v3/videos without id lists all user videos; real API requires id or chart
  • maxResults omitted returns everything; real API defaults to 5 per page
want more of the YouTube Data API surface? adapters are YAML + Starlark — the authoring guide covers adding routes, fixtures, and state machines. Open an issue for anything big first, or just file a PR — merged routes ship in the next release.