Simple API wrapper for Google's Books API written in Swift.
So far, GoogleBooksClient supports searching for volumes and fetching information about individual volumes by ID.
Currently unsupported: User-specific information via authenticated requests.
(not ordered by priority or severity)
- Add unit test coverage
- Support reactive frameworks supported by Moya (RxSwift, ReactiveSwift)
- Improve documentation
- Add continuous integration (travis-ci? circleCI? buddybuild?)
- Add Cocoapods support
- Add Swift Package Manager support
- Xcode 9+
- Swift 4
- iOS 10+
- Moya
Get your Google API Key from Google's Developer Console. There's two ways of providing your API key to GoogleBooksClient:
- Explicitly when instantiating
GoogleBooksClient(apiKey: .explicit("YOUR-API-KEY-HERE")
- Implicitly via your
Info.plist
entry calledGoogleBooksClientAPIKey
.
Note: GoogleBooksClient will work for most requests without API key. However, Google's Terms of Service require the use of an API key and/or access token and failure to provide an API key makes your application subject to more aggressive rate limiting!
// Podfile
target "YOURTARGETNAME" do
use_frameworks!
pod "GoogleBooksClient", :git => "https://github.com/opfeffer/GoogleBooksClient" # directly referencing Github until GA release
end
// Cartfile
github "opfeffer/GoogleBooksClient" "master"
// Package.swift
.package(url: "https://github.com/opfeffer/GoogleBooksClient", .branch("master"))
See GoogleBooksClient.playground
for details.
Xcode Playgrounds are a great way to prototype and test functionality without having to constantly re-run your application. It also allows standalone execution of a library/framework. Please note, should your API key be application-restricted to iOS applications only, you will want to add com.apple.dt.playground
as a valid bundle identifier in Google's developer console.
GoogleBooksClient is released under an MIT license. See LICENSE for more information.