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.
SPM Through XCode Project
File > Swift Packages > Add Package Dependency
Add https://github.com/marcodotio/HolodexKit.git
Select “Up to next Major” with “1.0.0”
SPM Through Xcode Package
Once you have your Swift package set up, add the Git link within the dependencies value of your Package.swift file.
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.
}
Development And Testing
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.
Next Steps
In the near future, there will be full documentation outlining how a user can fully utilize HolodexKit.
As well, more features listed in ToDo will be fully implemented.
More examples, from other platforms, will be uploaded for developers to be able to focus more on implementing the end user experience, and less time figuring out their project’s architecture.
Credits
I would like to personally thank the Holodex Team for implementing the REST endpoint, as without them, this project wouldn’t have been possible.
License
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.
HolodexKit is an API for the Holodex REST endpoint.
Features
ToDo
Requirements
Installation
Swift Package Manager
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.SPM Through XCode Project
https://github.com/marcodotio/HolodexKit.git
SPM Through Xcode Package
Once you have your Swift package set up, add the Git link within the
dependencies
value of yourPackage.swift
file.Using HolodexKit
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: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:
As well, you are able to make fine tune adjustments to the query using the
VideoParameter
struct:Development And Testing
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.
Next Steps
Credits
I would like to personally thank the Holodex Team for implementing the REST endpoint, as without them, this project wouldn’t have been possible.
License
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.