Giter Site home page Giter Site logo

marcodotio / holodexkit Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 124 KB

A Swift Package API for the Holodex REST endpoint.

License: MIT License

Swift 100.00%
swift api hololive json-api kit rest-api swift-concurrency swift-package-manager vtuber xcode

holodexkit's Introduction

HolodexKit

Swift Platforms Swift Package Manager

HolodexKit is an API for the Holodex REST endpoint.

Features

  • Query Live and Upcoming Videos of VTubers and subbers.
  • Query Videos of VTubers and subbers.
  • Get Channel Information of VTubers and subbers.
  • Query Videos Related to the Channel of a VTuber or subber.
  • Quickly Access Live / Upcoming Videos for a set of Channels of VTubers and subbers.
  • Get a single Video's metadata from a VTuber or subber.
  • List Channels of VTubers and subbers.
  • Comprehensive Unit and Integration Test coverage.
  • Swift Concurrency Support back to iOS 13, macOS 10.15, tvOS 13, and watchOS 6.

ToDo

  • Add Continuous Integration using Github Actions.
  • Endpoint search for Videos of VTubers and subbers.
  • Endpoint search for Comments from Videos of VTubers and subbers.
  • Complete documentation of HolodexKit.

Requirements

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

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

  • 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.

dependencies: [
	.package(url: "https://github.com/marcodotio/HolodexKit.git", .upToNextMajor(from: "1.0.0"))
]

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:

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's People

Contributors

marcodotio avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.