
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
The Google Books client is a simple Ruby gem that centralizes requests and communications with the Google Books API.
Install the gem and add to the application's Gemfile by executing:
bundle add google_books_client
Or add it manually to the Gemfile:
gem 'google_books_client'
If bundler is not being used to manage dependencies, install the gem by executing:
gem install google_books_client
To use the gem, you must first configure it in an initializer file at your project, for example:
# frozen_string_literal: true
require 'google_books_client'
GoogleBooksClient.configure do |config|
config.api_version = 'v1'
config.max_results = 10
config.timeout = 20
end
The configuration options are:
v1
.ActiveSupport::Cache::MemoryStore
.Logger.new($stdout)
.10
.20
.The models objective is to centralize the attributes and methods of the Google Books API resources. And make it easy to serialize and validate the data returned by the API. The models are:
You can use the models to serialize the data returned by the API, for example:
# frozen_string_literal: true
module GoogleBooks
module Serializers
class Volume < GoogleBooksCLient::Models::Volume
def id
id
end
def kind
kind
end
def title
volume_info.title
end
def publisher
volume_info.publisher
end
end
end
end
GoogleBooks::Serializers::Volume.serialize(volume)
The resources objective is to centralize the requests and communications with the Google Books API. The resources are:
You can use the resources to make requests to the API, for example:
GoogleBooksClient::Resources::Volumes.list_by_isbn('8532516262')
GoogleBooksClient::Resources::Volumes.list_by_title('Coraline')
A full list of the available methods for each resource class can be found in the resources documentation.
docker-compose build google_books_client # To build the image
docker-compose up -d google_books_client # To start the container detached
docker-compose exec google_books_client bash # To access the container
The tools can be used inside the container or locally.
./bin/setup # To install dependencies
./bin/console # To start the pry with the gem loaded
./bin/test # To run the tests, rubocop and coverage
Bug reports and pull requests are welcome on GitHub at https://github.com/betosardinha/google_books_client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
This project uses Semantic Versioning.
For a new release, update the version number in lib/google_books_client/version.rb
, and then create a new release on GitHub. It will automatically be published to RubyGems.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the Google::Books::Client project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
If you have any questions about the project, please contact me at:
If this project helped you, please consider giving it a star. It will mean a lot to me.
And if you consider my work valuable for your projects, you can support me on Buy Me a Coffee.
FAQs
Unknown package
We found that google_books_client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.