requestgooglebooks 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/requestgooglebooks.rb +13 -0
  3. metadata +44 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 7f12561dbd1fd46a091db201eee9a6373e70173f3de02c57721b93c41c1d33d6
4
+ data.tar.gz: 8194741f97ce9e9f8ee664eef544f5123bf00a1f4ed83996ff725e25bc1aeee6
5
+ SHA512:
6
+ metadata.gz: 6489c818089208cc1ccae8a214b4bab21b15e0c4405b4230a58d9f639c0fb1375a44f2b7d9a8cead2335e6956f01e011ea3b5bb7727b3e3454190e074b3ba93d
7
+ data.tar.gz: 78811a94623e6be74519595df25f9be18a3c1c2c3d52d86bded1e877d9ad94bf95d9e4b82cf5f7573ef9c4a2a4d201e5d070410370a2dccb290d0f9a9c80439b
@@ -0,0 +1,13 @@
1
+ class RequestGoogleBooks
2
+ require 'HTTParty'
3
+
4
+ #calling Google Books API endpoint to request info on the book title
5
+ def self.requestCoverURL(title, key)
6
+ @url = "https://www.googleapis.com/books/v1/volumes?q=#{title}&maxResults=1&key=#{key}"
7
+
8
+ response = HTTParty.get(@url)
9
+ @response = JSON.parse(response.body)
10
+
11
+ @coverURL = @response["items"][0]["volumeInfo"]["imageLinks"]["thumbnail"]
12
+ end
13
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: requestgooglebooks
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Sean Fulton
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-12-05 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: the initial scope of this gem is to request book covers from the Google
14
+ books api
15
+ email: seanfulton790@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/requestgooglebooks.rb
21
+ homepage: https://github.com/sean-fulton/Bookview
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubygems_version: 3.3.26
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Gem used to request the Google books api
44
+ test_files: []