HolodexKit is an API for the Holodex REST endpoint.
Platform | Minimum Swift Version | Installation | Status |
---|---|---|---|
iOS 13.0+ / macOS 10.15+ / tvOS 13.0+ / watchOS 6.0+ | 5.5 | Swift Package Manager | Fully Tested |
The Swift Package Manager allows for developers to easily integrate packages into their Xcode projects and packages; and is also fully integrated into the swift
compiler.
https://github.com/marcodotio/HolodexKit.git
Once you have your Swift package set up, add the Git link within the dependencies
value of your Package.swift
file.
dependencies: [
.package(url: "https://github.com/marcodotio/HolodexKit.git", .upToNextMajor(from: "1.0.0"))
]
HolodexKit is designed to be very easy to integrate into your own projects. The main method of utilizing HolodexKit is to set a Holodex
class object:
import HolodexKit
// Using the Holodex dummy server as provided in the endpoint
// documentation.
let holodexDummy = Holodex()
// Using the Holodex production server.
let holodexProduction = Holodex(withApiKey: "INSERT-YOUR-API-KEY-HERE")
From there, it's as easy as calling one of the provided function members. The code below demonstrates how you can retrieve the current live videos:
do {
guard let videos = holodexProduction.getLiveVideos() else { return }
} catch {
// Insert your own error handling method here.
}
As well, you are able to make fine tune adjustments to the query using the VideoParameter
struct:
do {
let videoParam = VideoParameter(limit: 10, org: .hololive)
guard let videos = holodexProduction.getLiveVideos(
withParameters: videoParam
) else { return }
} catch {
// Insert your own error handling method here.
}
I welcome anyone to contribute to the project through posting issues, if they encounter any bugs / glitches while using HolodexKit; as well with creating pull issues that add any additional features to HolodexKit.
I would like to personally thank the Holodex Team for implementing the REST endpoint, as without them, this project wouldn't have been possible.
HolodexKit is released under the MIT license, and any use of the production server will be under the License set by the Holodex Team. See LICENSE for details.
link |
Stars: 1 |
Last commit: 1 year ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics