Swiftpack.co -  bdewey/BookKit as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
bdewey/BookKit
Swift APIs for getting book information from popular web services
.package(url: "https://github.com/bdewey/BookKit.git", from: "v0.2.1")

BookKit

BookKit contains helper routines for dealing with common book-related services. It will help you:

  1. Issue a query to Google Books and parse the result. (Note: You must have your own Google Books API key for this.)
  2. Download cover images from OpenLibrary
  3. Parse the JSON files from LibraryThing
  4. Load a CSV file from Goodreads

Code Overview

  • Book is the core abstration of a "book" made available from any of the common book-tracking sites / services. The properties on Book are meant to be about the book itself, as opposed to the relationship between the book and a person (like when the book was added to a library, or how a reader rates the book).
  • AugmentedBook extends Book to add the metadata that are personal to a particular person, like review/rating.
  • AugmentedBook+CSV.swift contains utilities for loading AugmentedBook structs from CSV files saved from Goodreads.
  • LibraryThing contains utilities for loading AugmentedBook structs from a JSON file saved from LibraryThing.
  • GoogleBooks contains utilities for searching for books from Google Books.
  • OpenLibrary contains utilities for downloading book covers from Open Library.

Changelog

Version 0.2.1 - 2021-07-07

Bugfix: Calling ReadingHistory.finishReading() now sets hasRead to true

Version 0.2 - 2021-07-05

Added ReadingHistory

Version 0.1 - 2021-06-27

Initial version.

GitHub

link
Stars: 1
Last commit: 3 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Related Packages

Release Notes

3 weeks ago

Bugfix: Calling ReadingHistory.finishReading() now sets hasRead to true

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