1.0.0: rewrite on URLSession + async/await, zero dependencies - #23
Merged
Merged
Conversation
…ncies - New YouTubeLiveClient (Sendable) covering liveBroadcasts list/insert/update/ delete/bind/transition and liveStreams list/insert/update/delete - TokenProvider protocol replaces GoogleOAuth2 singleton and Info.plist keys; one automatic retry on 401 with a refreshed token - HTTPTransport seam (URLSession conforms) for testability - Typed YouTubeLiveError with parsed Google error payload - Models on plain Codable; lenient enums (unknown -> .unknown); RFC 3339 dates - Fixes carried over from 0.2.x: update body no longer nests status/ contentDetails in snippet; latencyPreference is a string enum; boundStreamLastUpdateTimeMs is a date; PUT bodies omit read-only fields - Drop Moya, Alamofire, SwiftyJSON, KeychainAccess, CocoaPods and the xcodeproj - 18 XCTest cases on a mock transport with API-shaped fixtures - README rewritten for 1.0 with a migration table Legacy 0.2.x state is preserved under tag legacy-0.2.45. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJJZJaTpLH4M7UgHQ9CgWr
- client.monitor(broadcastID:options:) polls broadcast + bound stream and emits snapshot / encoderConnected / transitionRequested / transitionFailed / testing / live / pollFailed / ended events - Drives ready -> testing -> live (monitor stream on) or ready -> live (off) once the encoder is sending; retries refused transitions; tolerates transient poll failures; stops on cancellation or when the broadcast ends - client.goLive(broadcastID:timeout:) convenience - New errors: .timeout(lastKnown:), .broadcastEnded - 13 tests on a stateful FakeYouTube transport routed by URL path - README: "Going live" section and migration rows Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJJZJaTpLH4M7UgHQ9CgWr
…tvOS/watchOS/visionOS builds Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJJZJaTpLH4M7UgHQ9CgWr
…n); checkout@v5 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJJZJaTpLH4M7UgHQ9CgWr
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJJZJaTpLH4M7UgHQ9CgWr
…orms on macos-15); pick iPhone simulator by UDID Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJJZJaTpLH4M7UgHQ9CgWr
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KJJZJaTpLH4M7UgHQ9CgWr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
From-scratch rewrite of the library. Details in
CHANGELOG.md; migration table inREADME.md.URLSession+Codable, no third-party dependencies, SPM onlyasync/awaitAPI, strict-concurrency clean,SendableclientTokenProviderprotocol replaces the built-in OAuth singleton andInfo.plistkeys; 401 → one retry with a refreshed tokenmonitor(broadcastID:)(AsyncThrowingStream<BroadcastEvent>) andgoLive(broadcastID:)replaceLiveLauncher+ delegateYouTubeLiveErrorwith Google's error payloadlatencyPreferencetype (from bug fixes #20), theliveBroadcasts.updatebody shape,boundStreamLastUpdateTimeMstypeThe pre-rewrite state is tagged
legacy-0.2.45.Test plan
swift build && swift test— 31/31 locally (macOS 14, arm64)🤖 Generated with Claude Code
https://claude.ai/code/session_01KJJZJaTpLH4M7UgHQ9CgWr