Swiftpack.co - Igor-Palaguta/YoutubeEngine as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Igor-Palaguta.
Igor-Palaguta/YoutubeEngine 0.7.1
Swift ReactiveCocoa lib for Youtube api
⭐️ 29
🕓 4 years ago
iOS macOS watchOS tvOS
.package(url: "https://github.com/Igor-Palaguta/YoutubeEngine.git", from: "0.7.1")

Build Status

YoutubeEngine

Library with ReactiveCocoa api for Youtube. Allows easy access required parts of videos and channels in one call.

Screenshots

YoutubeEngine

Example

To run the example project, clone the repo, and run carthage checkout.

let engine = Engine(authorization: .key(YOUR_API_KEY))
let request: SearchRequest = .search(withTerm: "VEVO",
                                     requiredVideoParts: [.statistics, .contentDetails],
                                     requiredChannelParts: [.statistics],
                                     requiredPlaylistParts: [.snippet],
                                     limit: 20)

engine.search(request)
    .startWithResult { result in
        guard case .success(let page) = result else {
            return
        }
        let formattedItems = page.items.enumerated().map { "[\($0)] = \($1)" }
        print("VEVO:\n\(formattedItems.joined(separator: "\n"))")
    }

Requirements

Supports Swift 5

Installation

Cocoapods

pod "YoutubeEngine", :git => 'https://github.com/Igor-Palaguta/YoutubeEngine', :tag => '0.7.0'

Carthage

github "Igor-Palaguta/YoutubeEngine" ~> 0.7.0

SPM

.package(url: "https://github.com/Igor-Palaguta/YoutubeEngine", .upToNextMinor(from: "0.7.0"))

Implemented API

  1. search list by keyword, videos from channel, related videos

  2. channels list by identifiers or my

  3. videos list by identifiers or popular

  4. playlistItems list by identifiers or from playlist

Author

Igor Palaguta, [email protected]

License

YoutubeEngine is available under the MIT license. See the LICENSE file for more info.

GitHub

link
Stars: 29
Last commit: 4 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Fix SPM Tests
4 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics